diff include/freeDiameter/libfdproto.h @ 1119:79dd22145f52

Fix a number of compilation warnings
author Sebastien Decugis <sdecugis@freediameter.net>
date Tue, 14 May 2013 11:04:20 +0800
parents caae38f15dfe
children c473581adff2
line wrap: on
line diff
--- a/include/freeDiameter/libfdproto.h	Tue May 14 09:56:36 2013 +0800
+++ b/include/freeDiameter/libfdproto.h	Tue May 14 11:04:20 2013 +0800
@@ -146,7 +146,7 @@
  */
 void fd_log ( int, const char *, ... ) _ATTRIBUTE_PRINTFLIKE_(2,3);
 #ifndef SWIG
-void fd_log_va( int, const char *, va_list args );
+void fd_log_va( int, const char *, va_list);
 #endif /* SWIG */
 
 /* these are internal objects of the debug facility, 
@@ -463,13 +463,17 @@
 		|| (fd_debug_one_file && !strcmp(fd_debug_one_file, __STRIPPED_FILE__) ); 
 }
 
+#ifndef SWIG
 static __inline__ void fd_log_deprecated( int level, const char *format, ... ) MARK_DEPRECATED
 { 
 	va_list ap;
 	va_start(ap, format);
 	fd_log_va(level, format, ap);
-	va_end(ap);	
+	va_end(ap);
 }
+#else /* SWIG */
+void fd_log_deprecated( int level, const char *format, ... );
+#endif /* SWIG */
 static __inline__ void replace_me() MARK_DEPRECATED { }
 
 #define TRACE_BUFFER(...) replace_me();
@@ -544,7 +548,7 @@
 	       TRACE_CALL("Check: %s", #__bool__ );						       \
 	       if ( ! (__bool__) ) {								       \
 		       int __ret__ = EINVAL;							       \
-		       TRACE_ERROR("ERROR: invalid parameter '%s'",  #__bool__ );  	               \
+		       TRACE_ERROR("ERROR: Invalid parameter '%s', %d",  #__bool__, __ret__ );         \
 		       __fallback__;								       \
 	       }										       \
 }
@@ -1230,7 +1234,7 @@
 	char *	 		 type_name;	/* The name of this type */
 	dict_avpdata_interpret	 type_interpret;/* cb to convert the AVP value in more comprehensive format (or NULL) */
 	dict_avpdata_encode	 type_encode;	/* cb to convert formatted data into an AVP value (or NULL) */
-	DECLARE_FD_DUMP_PROTOTYPE((*type_dump), union avp_value * val); /* cb called by fd_msg_dump_one for this type of data (if != NULL). Returned string must be freed.  */
+	DECLARE_FD_DUMP_PROTOTYPE((*type_dump), union avp_value * val); /* cb called by fd_msg_dump_* for this type of data (if != NULL). Returned string must be freed.  */
 };
 
 /* The criteria for searching a type object in the dictionary */
"Welcome to our mercurial repository"