diff options
author | marius <marius@FreeBSD.org> | 2010-09-24 10:40:17 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2010-09-24 10:40:17 +0000 |
commit | b33b39bf8fca1665dc3b1f2d01092704fa9387d2 (patch) | |
tree | 2f8808cab176e2913d55c56aa2ac6b5eda69d0de /libexec/tftpd/tftp-utils.c | |
parent | b9eeaa21c2c08a8a5837ece770038dd9704067f3 (diff) | |
download | FreeBSD-src-b33b39bf8fca1665dc3b1f2d01092704fa9387d2.zip FreeBSD-src-b33b39bf8fca1665dc3b1f2d01092704fa9387d2.tar.gz |
Make WARNS=6 clean.
MFC after: 1 week
Diffstat (limited to 'libexec/tftpd/tftp-utils.c')
-rw-r--r-- | libexec/tftpd/tftp-utils.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libexec/tftpd/tftp-utils.c b/libexec/tftpd/tftp-utils.c index da58064..d6d0558 100644 --- a/libexec/tftpd/tftp-utils.c +++ b/libexec/tftpd/tftp-utils.c @@ -59,7 +59,7 @@ int acting_as_client; * first timeout) to 'timeoutnetwork' (i.e. the last timeout) */ int -settimeouts(int _timeoutpacket, int _timeoutnetwork, int _maxtimeouts) +settimeouts(int _timeoutpacket, int _timeoutnetwork, int _maxtimeouts __unused) { int i; @@ -91,7 +91,7 @@ unmappedaddr(struct sockaddr_in6 *sin6) !IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) return; sin4 = (struct sockaddr_in *)sin6; - addr = *(u_int32_t *)&sin6->sin6_addr.s6_addr[12]; + memcpy(&addr, &sin6->sin6_addr.s6_addr[12], sizeof(addr)); port = sin6->sin6_port; memset(sin4, 0, sizeof(struct sockaddr_in)); sin4->sin_addr.s_addr = addr; @@ -170,7 +170,7 @@ struct packettypes packettypes[] = { { 0, NULL }, }; -char * +const char * packettype(int type) { static char failed[100]; @@ -231,7 +231,7 @@ debug_finds(char *s) return (i); } -char * +const char * debug_show(int d) { static char s[100]; @@ -317,4 +317,3 @@ printstats(const char *direction, int verbose, struct tftp_stats *ts) printf(" [%.0f bits/sec]", (ts->amount*8.)/delta); putchar('\n'); } - |