From eb49fcf59997141aba1d840b1d9385432f3a1a76 Mon Sep 17 00:00:00 2001 From: eadler Date: Sat, 16 Jun 2018 23:49:22 +0000 Subject: [PATCH] netrate: build with WARNS=6 Tested with amd64, i386 --- tools/tools/netrate/http/Makefile | 1 - tools/tools/netrate/http/http.c | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/tools/netrate/http/Makefile b/tools/tools/netrate/http/Makefile index bd144b545912..f73058794bc5 100644 --- a/tools/tools/netrate/http/Makefile +++ b/tools/tools/netrate/http/Makefile @@ -2,7 +2,6 @@ PROG= http MAN= -WARNS?= 3 LIBADD= pthread .include diff --git a/tools/tools/netrate/http/http.c b/tools/tools/netrate/http/http.c index ea9431f1f4e6..f70c8dd2e0d0 100644 --- a/tools/tools/netrate/http/http.c +++ b/tools/tools/netrate/http/http.c @@ -160,7 +160,7 @@ killall(void) } static void -signal_handler(int signum) +signal_handler(int signum __unused) { statep->hwd[curthread].hwd_start_signal_barrier = 1; @@ -232,7 +232,7 @@ usage(void) } static void -main_sighup(int signum) +main_sighup(int signum __unused) { killall(); @@ -242,7 +242,7 @@ int main(int argc, char *argv[]) { int ch, error, i; - char *pagebuffer; + struct state *pagebuffer; uintmax_t total; size_t len; pid_t pid; @@ -283,7 +283,7 @@ main(int argc, char *argv[]) err(-1, "mmap"); if (minherit(pagebuffer, len, INHERIT_SHARE) < 0) err(-1, "minherit"); - statep = (struct state *)pagebuffer; + statep = pagebuffer; bzero(&statep->sin, sizeof(statep->sin)); statep->sin.sin_len = sizeof(statep->sin);