diff --git a/tftpd/tftpd.c b/tftpd/tftpd.c index f5f9345..7edd955 100644 --- a/tftpd/tftpd.c +++ b/tftpd/tftpd.c @@ -35,13 +35,16 @@ * SUCH DAMAGE. */ +#include "tftpd.h" + #ifndef lint -static const char *copyright = +static const char *copyright UNUSED = "@(#) Copyright (c) 1983 Regents of the University of California.\n\ All rights reserved.\n"; /*static char sccsid[] = "from: @(#)tftpd.c 5.13 (Berkeley) 2/26/91";*/ /*static char rcsid[] = "$OpenBSD: tftpd.c,v 1.13 1999/06/23 17:01:36 deraadt Exp $: tftpd.c,v 1.6 1997/02/16 23:49:21 deraadt Exp $";*/ -static const char *rcsid = "tftp-hpa $Id$"; +static const char *rcsid UNUSED = +"tftp-hpa $Id$"; #endif /* not lint */ /* @@ -74,7 +77,6 @@ static const char *rcsid = "tftp-hpa $Id$"; #include #include -#include "tftpd.h" #include "tftpsubs.h" #include "recvfrom.h" #include "remap.h" @@ -150,6 +152,7 @@ struct options { static volatile sig_atomic_t caught_sighup = 0; static void handle_sighup(int sig) { + (void)sig; /* Suppress unused warning */ caught_sighup = 1; } @@ -758,7 +761,7 @@ sigjmp_buf timeoutbuf; void timer(int sig) { - + (void)sig; /* Suppress unused warning */ timeout += rexmtval; if (timeout >= maxtimeout) exit(0); @@ -867,6 +870,7 @@ sendfile(struct formats *pf, struct tftphdr *oap, int oacklen) void justquit(int sig) { + (void)sig; /* Suppress unused warning */ exit(0); } diff --git a/tftpd/tftpd.h b/tftpd/tftpd.h index f369454..511cf26 100644 --- a/tftpd/tftpd.h +++ b/tftpd/tftpd.h @@ -51,4 +51,10 @@ void set_signal(int, void (*)(int), int); void *tfmalloc(size_t); char *tfstrdup(const char *); +#ifdef __GNUC__ +#define UNUSED __attribute__((unused)) +#else +#define UNUSED +#endif + #endif