From d4bdbca847ff1c788d6467e915d0b94e57da35bb Mon Sep 17 00:00:00 2001 From: Niels Provos Date: Tue, 18 Dec 2007 03:54:19 +0000 Subject: [PATCH] add -Wstrict-aliasing and remove bogus evtag_test from event.h svn:r602 --- ChangeLog | 2 +- configure.in | 2 +- event.h | 2 -- test/regress.c | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 38b8c9da..b18920d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -27,7 +27,7 @@ Changes in current version: o fix a bug with event_rpcgen for integers o restructure the code to make event activation independent of regular event logic o Correctly handle DNS replies with no answers set (Fixes bug 1846282) - + o add -Wstrict-aliasing to warnings and more cleanup Changes in 1.4.0: o allow \r or \n individually to separate HTTP headers instead of the standard "\r\n"; from Charles Kerr. diff --git a/configure.in b/configure.in index ea8dd114..dae19af9 100644 --- a/configure.in +++ b/configure.in @@ -353,7 +353,7 @@ if test x$enable_gcc_warnings = xyes; then #endif]), have_gcc42=yes, have_gcc42=no) CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat=2 -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast -Wswitch-enum -Werror" - CFLAGS="$CFLAGS -Wno-unused-parameter -Wno-sign-compare" + CFLAGS="$CFLAGS -Wno-unused-parameter -Wno-sign-compare -Wstrict-aliasing" if test x$have_gcc4 = xyes ; then # These warnings break gcc 3.3.5 and work on gcc 4.0.2 diff --git a/event.h b/event.h index c0bd8aca..9e5c4eaa 100644 --- a/event.h +++ b/event.h @@ -1137,8 +1137,6 @@ void evtag_marshal_string(struct evbuffer *buf, ev_uint32_t tag, void evtag_marshal_timeval(struct evbuffer *evbuf, ev_uint32_t tag, struct timeval *tv); -void evtag_test(void); - int evtag_unmarshal(struct evbuffer *src, ev_uint32_t *ptag, struct evbuffer *dst); int evtag_peek(struct evbuffer *evbuf, ev_uint32_t *ptag); diff --git a/test/regress.c b/test/regress.c index 993fd8a0..aa17c014 100644 --- a/test/regress.c +++ b/test/regress.c @@ -1377,7 +1377,7 @@ evtag_tag_encoding(void) fprintf(stdout, "\t%s: OK\n", __func__); } -void +static void evtag_test(void) { fprintf(stdout, "Testing Tagging:\n"); -- 2.40.0