From 7294aa6146ceb9dd2ebff8b496e351a81a0c8c8c Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Sat, 25 Mar 2006 14:35:10 +0000 Subject: More warning fixes (from FreeBSD 6.1). svn path=/branches/BRANCH_6-3/; revision=4753 --- interface.c | 4 ++-- pop3.c | 2 ++ sink.c | 2 +- socket.c | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/interface.c b/interface.c index 0d1c5ad0..926c82ef 100644 --- a/interface.c +++ b/interface.c @@ -63,8 +63,6 @@ struct interface_pair_s { struct in_addr interface_mask; } *interface_pair; -static char *netdevfmt; - /* * Count of packets to see on an interface before monitor considers it up. * Needed because when pppd shuts down the link, the packet counts go up @@ -76,6 +74,8 @@ static char *netdevfmt; #ifdef linux #define have_interface_init +static char *netdevfmt; + void interface_init(void) /* figure out which /proc/net/dev format to use */ { diff --git a/pop3.c b/pop3.c index 4456b2d3..4e6440f5 100644 --- a/pop3.c +++ b/pop3.c @@ -1182,6 +1182,8 @@ static int pop3_fetch(int sock, struct query *ctl, int number, int *lenp) } while (!(buf[0] == '.' && (buf[1] == '\r' || buf[1] == '\n' || buf[1] == '\0'))); } +#else + (void)ctl; #endif /* SDPS_ENABLE */ /* diff --git a/sink.c b/sink.c index aaa0beba..c4a26f6b 100644 --- a/sink.c +++ b/sink.c @@ -300,7 +300,7 @@ static int send_bouncemail(struct query *ctl, struct msgblk *msg, /* our first duty is to keep the sacred foo counters turning... */ snprintf(boundary, sizeof(boundary), "foo-mani-padme-hum-%ld-%ld-%ld", - (long)getpid(), (long)getppid(), time(NULL)); + (long)getpid(), (long)getppid(), (long)time(NULL)); if (outlevel >= O_VERBOSE) report(stdout, GT_("SMTP: (bounce-message body)\n")); diff --git a/socket.c b/socket.c index 10cd5d99..b953f3f3 100644 --- a/socket.c +++ b/socket.c @@ -591,7 +591,7 @@ SSL *SSLGetContext( int sock ) if( NULL == _ctx ) return NULL; - if( sock < 0 || sock > FD_SETSIZE ) + if( sock < 0 || (unsigned)sock > FD_SETSIZE ) return NULL; return _ssl_context[sock]; } @@ -807,7 +807,7 @@ int SSLOpen(int sock, char *mycert, char *mykey, char *myproto, int certck, char #endif /* SSL_ENABLE */ - if( sock < 0 || sock > FD_SETSIZE ) { + if( sock < 0 || (unsigned)sock > FD_SETSIZE ) { report(stderr, GT_("File descriptor out of range for SSL") ); return( -1 ); } -- cgit v1.2.3