# HG changeset patch # User Sebastien Decugis # Date 1366083952 -28800 # Node ID 000e1904074cbb7fd21d4b7e26d4ff7d12189f3a # Parent 313c510b0d657fe6eae7b9260dffd45d0c156959 Fix a number of additional warnings diff -r 313c510b0d65 -r 000e1904074c extensions/app_diameap/diameap_tls.h --- a/extensions/app_diameap/diameap_tls.h Tue Apr 16 11:18:59 2013 +0800 +++ b/extensions/app_diameap/diameap_tls.h Tue Apr 16 11:45:52 2013 +0800 @@ -41,9 +41,10 @@ #include "diameap_defs.h" #include +#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include -#pragma GCC diagnostic warning "-Wdeprecated-declarations" +#pragma GCC diagnostic pop #include #include diff -r 313c510b0d65 -r 000e1904074c extensions/app_diameap/libcrypt.h --- a/extensions/app_diameap/libcrypt.h Tue Apr 16 11:18:59 2013 +0800 +++ b/extensions/app_diameap/libcrypt.h Tue Apr 16 11:45:52 2013 +0800 @@ -39,9 +39,10 @@ #ifndef LIBCRYPT_H_ #define LIBCRYPT_H_ +#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include -#pragma GCC diagnostic warning "-Wdeprecated-declarations" +#pragma GCC diagnostic pop #include /* EAP-TLS*/ diff -r 313c510b0d65 -r 000e1904074c extensions/app_diameap/plugins/eap_md5/eap_md5.c --- a/extensions/app_diameap/plugins/eap_md5/eap_md5.c Tue Apr 16 11:18:59 2013 +0800 +++ b/extensions/app_diameap/plugins/eap_md5/eap_md5.c Tue Apr 16 11:45:52 2013 +0800 @@ -37,9 +37,10 @@ #include "../../plugins.h" +#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include -#pragma GCC diagnostic warning "-Wdeprecated-declarations" +#pragma GCC diagnostic pop #define CHALLENGE_LEN 16 diff -r 313c510b0d65 -r 000e1904074c extensions/app_diameap/plugins/eap_tls/eaptls.l --- a/extensions/app_diameap/plugins/eap_tls/eaptls.l Tue Apr 16 11:18:59 2013 +0800 +++ b/extensions/app_diameap/plugins/eap_tls/eaptls.l Tue Apr 16 11:45:52 2013 +0800 @@ -39,6 +39,7 @@ /*Declarations and option settings*/ %{ #include +#include "eap_tls.h" #include "eaptls.tab.h" #define YY_USER_ACTION { \ diff -r 313c510b0d65 -r 000e1904074c extensions/app_radgw/rgw_clients.c --- a/extensions/app_radgw/rgw_clients.c Tue Apr 16 11:18:59 2013 +0800 +++ b/extensions/app_radgw/rgw_clients.c Tue Apr 16 11:45:52 2013 +0800 @@ -912,7 +912,7 @@ struct rgw_client * prev = NULL, *new = NULL; int ret; - TRACE_ENTRY("%p %p %lu", ip_port, key, keylen); + TRACE_ENTRY("%p %p %zu", ip_port, key, keylen); CHECK_PARAMS( ip_port && key && *key && keylen ); CHECK_PARAMS( (ip_port->sa_family == AF_INET) || (ip_port->sa_family == AF_INET6) ); diff -r 313c510b0d65 -r 000e1904074c extensions/app_sip/app_sip.h --- a/extensions/app_sip/app_sip.h Tue Apr 16 11:18:59 2013 +0800 +++ b/extensions/app_sip/app_sip.h Tue Apr 16 11:45:52 2013 +0800 @@ -38,9 +38,10 @@ #include #include #include +#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include -#pragma GCC diagnostic warning "-Wdeprecated-declarations" +#pragma GCC diagnostic pop #include #include #include "md5.h" diff -r 313c510b0d65 -r 000e1904074c extensions/test_sip/test_sip.h --- a/extensions/test_sip/test_sip.h Tue Apr 16 11:18:59 2013 +0800 +++ b/extensions/test_sip/test_sip.h Tue Apr 16 11:45:52 2013 +0800 @@ -38,9 +38,10 @@ #include #include #include +#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include -#pragma GCC diagnostic warning "-Wdeprecated-declarations" +#pragma GCC diagnostic pop #include #include diff -r 313c510b0d65 -r 000e1904074c include/freeDiameter/libfdproto.h --- a/include/freeDiameter/libfdproto.h Tue Apr 16 11:18:59 2013 +0800 +++ b/include/freeDiameter/libfdproto.h Tue Apr 16 11:45:52 2013 +0800 @@ -250,7 +250,8 @@ #ifdef DEBUG /* A version of __FILE__ without the full path */ static char * file_bname = NULL; -#define __STRIPPED_FILE__ (file_bname ?: (file_bname = basename((char *)__FILE__))) +static char * file_bname_init(char * full) { file_bname = basename(full); return file_bname; } +#define __STRIPPED_FILE__ (file_bname ?: file_bname_init((char *)__FILE__)) /* Boolean for tracing at a certain level */ #define TRACE_BOOL(_level_) ( ((_level_) <= fd_g_debug_lvl) \ diff -r 313c510b0d65 -r 000e1904074c libfdcore/config.c --- a/libfdcore/config.c Tue Apr 16 11:18:59 2013 +0800 +++ b/libfdcore/config.c Tue Apr 16 11:45:52 2013 +0800 @@ -226,6 +226,7 @@ #endif /* GNUTLS_VERSION_300 */ #ifndef GNUTLS_VERSION_300 +# pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif /* !GNUTLS_VERSION_300 */ /* Parse the configuration file (using the yacc parser) */ @@ -598,7 +599,7 @@ return 0; } #ifndef GNUTLS_VERSION_300 -# pragma GCC diagnostic pop "-Wdeprecated-declarations" +# pragma GCC diagnostic pop #endif /* !GNUTLS_VERSION_300 */ diff -r 313c510b0d65 -r 000e1904074c libfdcore/core.c --- a/libfdcore/core.c Tue Apr 16 11:18:59 2013 +0800 +++ b/libfdcore/core.c Tue Apr 16 11:45:52 2013 +0800 @@ -35,9 +35,10 @@ #include "fdcore-internal.h" +#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include -#pragma GCC diagnostic pop "-Wdeprecated-declarations" +#pragma GCC diagnostic pop /* The static configuration structure */ static struct fd_config g_conf; diff -r 313c510b0d65 -r 000e1904074c libfdcore/endpoints.c --- a/libfdcore/endpoints.c Tue Apr 16 11:18:59 2013 +0800 +++ b/libfdcore/endpoints.c Tue Apr 16 11:45:52 2013 +0800 @@ -63,7 +63,7 @@ TRACE_DEBUG(ANNOYING, " DEBUG:fd_ep_add_merge Current list:"); fd_ep_dump( 4, list ); TRACE_DEBUG(ANNOYING, " DEBUG:fd_ep_add_merge Adding:"); - fd_log_debug(" %s {%s%s%s%s}", buf, + fd_log_debug(" %s {%s%s%s%s%s}", buf, (flags & EP_FL_CONF) ? "C" : "-", (flags & EP_FL_DISC) ? "D" : "-", (flags & EP_FL_ADV) ? "A" : "-", diff -r 313c510b0d65 -r 000e1904074c libfdcore/p_psm.c --- a/libfdcore/p_psm.c Tue Apr 16 11:18:59 2013 +0800 +++ b/libfdcore/p_psm.c Tue Apr 16 11:45:52 2013 +0800 @@ -659,7 +659,7 @@ /* At this point the message must have been fully handled already */ if (msg) { - fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Internal error: unhandled message.", peer->p_hdr.info.pi_diamid ); + fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Internal error ('%s'): unhandled message.", peer->p_hdr.info.pi_diamid ); fd_msg_free(msg); } diff -r 313c510b0d65 -r 000e1904074c libfdcore/sctps.c --- a/libfdcore/sctps.c Tue Apr 16 11:18:59 2013 +0800 +++ b/libfdcore/sctps.c Tue Apr 16 11:45:52 2013 +0800 @@ -230,6 +230,7 @@ /* Set the parameters of a session to use the appropriate fifo and stream information */ #ifndef GNUTLS_VERSION_300 +# pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif /* !GNUTLS_VERSION_300 */ static void set_sess_transport(gnutls_session_t session, struct sctps_ctx *ctx) @@ -250,7 +251,7 @@ return; } #ifndef GNUTLS_VERSION_300 -# pragma GCC diagnostic pop "-Wdeprecated-declarations" +# pragma GCC diagnostic pop #endif /* !GNUTLS_VERSION_300 */ /*************************************************************/ diff -r 313c510b0d65 -r 000e1904074c libfdproto/dictionary_functions.c --- a/libfdproto/dictionary_functions.c Tue Apr 16 11:18:59 2013 +0800 +++ b/libfdproto/dictionary_functions.c Tue Apr 16 11:45:52 2013 +0800 @@ -278,7 +278,7 @@ char *conv; /* XXX: 2036 fix */ out += DIFF_EPOCH_TO_NTP; - CHECK_PARAMS( (out & 0xffffffff00000000) == 0); + CHECK_PARAMS( (out >> 32) == 0); CHECK_MALLOC(conv=(char *)malloc(5)); @@ -313,7 +313,7 @@ CHECK_PARAMS( avp_value && interpreted ); - return diameter_string_to_time_t(avp_value->os.data, avp_value->os.len, interpreted); + return diameter_string_to_time_t((const char *)avp_value->os.data, avp_value->os.len, interpreted); } char * fd_dictfct_Time_dump(union avp_value * avp_value) diff -r 313c510b0d65 -r 000e1904074c tests/tests.h --- a/tests/tests.h Tue Apr 16 11:18:59 2013 +0800 +++ b/tests/tests.h Tue Apr 16 11:45:52 2013 +0800 @@ -46,9 +46,10 @@ #include #include +#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include -#pragma GCC diagnostic warning "-Wdeprecated-declarations" +#pragma GCC diagnostic pop /* Test timeout duration, unless -n is passed on the command line */ #ifndef TEST_TIMEOUT