Index: extensions/app_diameap/diameap_tls.h
===================================================================
--- extensions/app_diameap/diameap_tls.h	(revision 959)
+++ extensions/app_diameap/diameap_tls.h	(revision 1033)
@@ -42,7 +42,8 @@
 #include "diameap_defs.h"
 #include <gnutls/gnutls.h>
+#pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 #include <gcrypt.h>
-#pragma GCC diagnostic warning "-Wdeprecated-declarations"
+#pragma GCC diagnostic pop
 #include <errno.h>
 #include <pthread.h>
Index: extensions/app_diameap/libcrypt.h
===================================================================
--- extensions/app_diameap/libcrypt.h	(revision 959)
+++ extensions/app_diameap/libcrypt.h	(revision 1033)
@@ -40,7 +40,8 @@
 #define LIBCRYPT_H_
 
+#pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 #include <gcrypt.h>
-#pragma GCC diagnostic warning "-Wdeprecated-declarations"
+#pragma GCC diagnostic pop
 #include <stdio.h>
 
Index: extensions/app_diameap/plugins/eap_md5/eap_md5.c
===================================================================
--- extensions/app_diameap/plugins/eap_md5/eap_md5.c	(revision 1027)
+++ extensions/app_diameap/plugins/eap_md5/eap_md5.c	(revision 1033)
@@ -38,7 +38,8 @@
 
 #include "../../plugins.h"
+#pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 #include <gcrypt.h>
-#pragma GCC diagnostic warning "-Wdeprecated-declarations"
+#pragma GCC diagnostic pop
 
 #define CHALLENGE_LEN	16
Index: extensions/app_diameap/plugins/eap_tls/eaptls.l
===================================================================
--- extensions/app_diameap/plugins/eap_tls/eaptls.l	(revision 565)
+++ extensions/app_diameap/plugins/eap_tls/eaptls.l	(revision 1033)
@@ -40,4 +40,5 @@
 %{
 #include <stdio.h>
+#include "eap_tls.h"
 #include "eaptls.tab.h"
 
Index: extensions/app_radgw/rgw_clients.c
===================================================================
--- extensions/app_radgw/rgw_clients.c	(revision 1027)
+++ extensions/app_radgw/rgw_clients.c	(revision 1033)
@@ -913,5 +913,5 @@
 	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 );
Index: extensions/app_sip/app_sip.h
===================================================================
--- extensions/app_sip/app_sip.h	(revision 1027)
+++ extensions/app_sip/app_sip.h	(revision 1033)
@@ -39,7 +39,8 @@
 #include <stdlib.h>
 #include <stdio.h>
+#pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 #include <gcrypt.h>
-#pragma GCC diagnostic warning "-Wdeprecated-declarations"
+#pragma GCC diagnostic pop
 #include <string.h>
 #include <mysql.h>
Index: extensions/test_sip/test_sip.h
===================================================================
--- extensions/test_sip/test_sip.h	(revision 972)
+++ extensions/test_sip/test_sip.h	(revision 1033)
@@ -39,7 +39,8 @@
 #include <stdlib.h>
 #include <stdio.h>
+#pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 #include <gcrypt.h>
-#pragma GCC diagnostic warning "-Wdeprecated-declarations"
+#pragma GCC diagnostic pop
 #include <string.h>
 #include <mysql.h>
Index: include/freeDiameter/libfdproto.h
===================================================================
--- include/freeDiameter/libfdproto.h	(revision 1027)
+++ include/freeDiameter/libfdproto.h	(revision 1033)
@@ -251,5 +251,6 @@
 /* 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 */
Index: libfdcore/config.c
===================================================================
--- libfdcore/config.c	(revision 1027)
+++ libfdcore/config.c	(revision 1033)
@@ -227,4 +227,5 @@
 
 #ifndef GNUTLS_VERSION_300
+# pragma GCC diagnostic push
 # pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 #endif /* !GNUTLS_VERSION_300 */
@@ -599,5 +600,5 @@
 }
 #ifndef GNUTLS_VERSION_300
-# pragma GCC diagnostic pop "-Wdeprecated-declarations"
+# pragma GCC diagnostic pop
 #endif /* !GNUTLS_VERSION_300 */
 
Index: libfdcore/core.c
===================================================================
--- libfdcore/core.c	(revision 1027)
+++ libfdcore/core.c	(revision 1033)
@@ -36,7 +36,8 @@
 #include "fdcore-internal.h"
 
+#pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 #include <gcrypt.h>
-#pragma GCC diagnostic pop "-Wdeprecated-declarations"
+#pragma GCC diagnostic pop
 
 /* The static configuration structure */
Index: libfdcore/endpoints.c
===================================================================
--- libfdcore/endpoints.c	(revision 976)
+++ libfdcore/endpoints.c	(revision 1033)
@@ -64,5 +64,5 @@
 		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" : "-",
Index: libfdcore/p_psm.c
===================================================================
--- libfdcore/p_psm.c	(revision 1027)
+++ libfdcore/p_psm.c	(revision 1033)
@@ -660,5 +660,5 @@
 		/* 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);
 		}
Index: libfdcore/sctps.c
===================================================================
--- libfdcore/sctps.c	(revision 1027)
+++ libfdcore/sctps.c	(revision 1033)
@@ -231,4 +231,5 @@
 /* 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 */
@@ -251,5 +252,5 @@
 }
 #ifndef GNUTLS_VERSION_300
-# pragma GCC diagnostic pop "-Wdeprecated-declarations"
+# pragma GCC diagnostic pop
 #endif /* !GNUTLS_VERSION_300 */
 
Index: libfdproto/dictionary_functions.c
===================================================================
--- libfdproto/dictionary_functions.c	(revision 1029)
+++ libfdproto/dictionary_functions.c	(revision 1033)
@@ -279,5 +279,5 @@
     /* XXX: 2036 fix */
     out += DIFF_EPOCH_TO_NTP;
-    CHECK_PARAMS( (out & 0xffffffff00000000) == 0);
+    CHECK_PARAMS( (out >> 32) == 0);
 
     CHECK_MALLOC(conv=(char *)malloc(5));
@@ -314,5 +314,5 @@
 	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);
 }
 
Index: tests/tests.h
===================================================================
--- tests/tests.h	(revision 1000)
+++ tests/tests.h	(revision 1033)
@@ -47,7 +47,8 @@
 #include <pthread.h>
 #include <errno.h>
+#pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 #include <gcrypt.h>
-#pragma GCC diagnostic warning "-Wdeprecated-declarations"
+#pragma GCC diagnostic pop
 
 /* Test timeout duration, unless -n is passed on the command line */
