From: Andre Noll Date: Sat, 19 May 2007 11:19:27 +0000 (+0200) Subject: add -Wbad-function-cast to +CPPFLAGS and fix two compiler warnings X-Git-Tag: v0.2.17~68 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=652128ed748840a22d4dcb85c1ac54bc95fdc33d add -Wbad-function-cast to +CPPFLAGS and fix two compiler warnings --- diff --git a/Makefile.in b/Makefile.in index cd9e283d..9a10859f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -20,8 +20,9 @@ DEBUG_CPPFLAGS += -Wredundant-decls # produces false positives # DEBUG_CPPFLAGS += -Wunreachable-code # DEBUG_CPPFLAGS += -Wwrite-strings -# invalid option for gcc-3.3.5 +# invalid option for gcc-3.3.3 # DEBUG_CPPFLAGS += -Wextra +# DEBUG_CPPFLAGS += -Wold-style-definition CPPFLAGS += -Os CPPFLAGS += -Wall @@ -40,6 +41,7 @@ CPPFLAGS += -Werror-implicit-function-declaration CPPFLAGS += -Wmissing-format-attribute CPPFLAGS += -Wunused-macros CPPFLAGS += -Wshadow +CPPFLAGS += -Wbad-function-cast BINARIES = para_server para_client para_gui para_audioc para_recv \ para_filter para_write @extra_binaries@ diff --git a/daemon.c b/daemon.c index 46eb8f19..67bc6f2f 100644 --- a/daemon.c +++ b/daemon.c @@ -171,13 +171,15 @@ time_t server_uptime(enum uptime set_or_get) { static time_t startuptime; time_t now; + double diff; if (set_or_get == UPTIME_SET) { time(&startuptime); return 0; } time(&now); - return (time_t) difftime(now, startuptime); + diff = difftime(now, startuptime); + return (time_t) diff; } /** diff --git a/grab_client.c b/grab_client.c index 50594f23..20b90651 100644 --- a/grab_client.c +++ b/grab_client.c @@ -277,7 +277,7 @@ err_out: * This has to be called once during startup before any other function from * grab_client.c may be used. It initializes \a inactive_grab_client_list. */ -void init_grabbing() +void init_grabbing(void) { PARA_INFO_LOG("%s", "grab init\n"); INIT_LIST_HEAD(&inactive_grab_client_list);