Fix a couple of MinGW warnings.
This commit is contained in:
parent
949e02b933
commit
45983e66e6
|
@ -67,7 +67,9 @@
|
|||
#define SPEED_T_STR "TB/s"
|
||||
|
||||
static bool paused = false;
|
||||
#ifdef SIGHUP
|
||||
static bool seenHUP = false;
|
||||
#endif
|
||||
static const char *logfileName = NULL;
|
||||
static tr_sys_file_t logfile = TR_BAD_SYS_FILE;
|
||||
static tr_session * mySession = NULL;
|
||||
|
@ -262,7 +264,12 @@ tr_daemon (int nochdir, int noclose)
|
|||
return 0;
|
||||
|
||||
#else /* USE_NO_DAEMON */
|
||||
|
||||
(void) nochdir;
|
||||
(void) noclose;
|
||||
|
||||
return 0;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -364,6 +371,8 @@ printMessage (tr_sys_file_t logfile, int level, const char * name, const char *
|
|||
else
|
||||
syslog (priority, "%s (%s:%d)", message, file, line);
|
||||
}
|
||||
#else
|
||||
(void) level;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -359,6 +359,11 @@ tr_getQuotaFreeSpace (const struct tr_device_info * info)
|
|||
{
|
||||
ret = getquota (info->device);
|
||||
}
|
||||
|
||||
#else /* _WIN32 */
|
||||
|
||||
(void) info;
|
||||
|
||||
#endif /* _WIN32 */
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -2115,7 +2115,7 @@ torrentCallScript (const tr_torrent * tor, const char * script)
|
|||
tr_logAddTorInfo (tor, "Calling script \"%s\"", script);
|
||||
|
||||
#ifdef _WIN32
|
||||
if (_spawnvpe (_P_NOWAIT, script, (const char*)cmd, env) == -1)
|
||||
if (_spawnvpe (_P_NOWAIT, script, (const char* const*)cmd, (const char* const*)env) == -1)
|
||||
tr_logAddTorErr (tor, "error executing script \"%s\": %s", cmd[0], tr_strerror (errno));
|
||||
#else
|
||||
signal (SIGCHLD, onSigCHLD);
|
||||
|
|
|
@ -388,6 +388,8 @@ test_truncd (void)
|
|||
/* FIXME: MSCVRT behaves differently in case of nan */
|
||||
tr_snprintf (buf, sizeof (buf), "%.2f", tr_truncd (nan, 2));
|
||||
check (strstr (buf, "nan") != NULL);
|
||||
#else
|
||||
(void) nan;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -348,6 +348,8 @@ tr_select (int nfds,
|
|||
struct timeval * t)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
(void) nfds;
|
||||
|
||||
if (!r_fd_set->fd_count && !w_fd_set->fd_count && !c_fd_set->fd_count)
|
||||
{
|
||||
const long int msec = t->tv_sec*1000 + t->tv_usec/1000;
|
||||
|
|
Loading…
Reference in New Issue