Changeset 14641


Ignore:
Timestamp:
Dec 29, 2015, 12:42:40 AM (5 years ago)
Author:
mikedld
Message:

Get rid of some more warnings

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/daemon-posix.c

    r14640 r14641  
    1212#include <pthread.h>
    1313#include <signal.h>
    14 #include <stdlib.h> /* daemon (), exit () */
     14#include <stdlib.h> /* abort (), daemon (), exit () */
    1515#include <fcntl.h> /* open () */
    1616#include <unistd.h> /* fork (), setsid (), chdir (), dup2 (), close (), pipe () */
     
    7171  const int old_errno = errno;
    7272
    73   write (signal_pipe[1], &sig, sizeof (sig));
     73  if (write (signal_pipe[1], &sig, sizeof (sig)) == -1)
     74    abort ();
    7475
    7576  errno = old_errno;
  • trunk/libtransmission/torrent.c

    r14640 r14641  
    21792179            putenv (env[i]);
    21802180
    2181           (void) chdir ("/");
     2181          if (chdir ("/") == -1)
     2182            /* ignore (nice to have but not that critical) */;
    21822183
    21832184          if (execvp (script, cmd) == -1)
  • trunk/libtransmission/tr-lpd.c

    r14532 r14641  
    405405* functions. In any other respect, lpd_consistencyCheck is an orphaned function.
    406406*/
    407 static inline void lpd_consistencyCheck (void)
     407UNUSED static inline void
     408lpd_consistencyCheck (void)
    408409{
    409410    /* if the following check fails, the definition of a hash string has changed
  • trunk/libtransmission/utils.c

    r14639 r14641  
    813813  const char * host_end = memchr (authority, ':', authority_len);
    814814
    815   const size_t host_len = host_end != NULL ? host_end - authority : authority_len;
     815  const size_t host_len = host_end != NULL ? (size_t) (host_end - authority) : authority_len;
    816816  if (host_len == 0)
    817817    return false;
  • trunk/libtransmission/utils.h

    r14639 r14641  
    361361
    362362/** @brief return true if the url is a http or https or UDP url that Transmission understands */
    363 bool tr_urlIsValidTracker (const char * url) TR_GNUC_NONNULL (1);
     363bool tr_urlIsValidTracker (const char * url);
    364364
    365365/** @brief return true if the url is a [ http, https, ftp, sftp ] url that Transmission understands */
    366 bool tr_urlIsValid (const char * url, size_t url_len) TR_GNUC_NONNULL (1);
     366bool tr_urlIsValid (const char * url, size_t url_len);
    367367
    368368/** @brief parse a URL into its component parts
Note: See TracChangeset for help on using the changeset viewer.