From: Chuck Lever Date: Mon, 1 Jul 2013 13:40:02 +0000 (-0400) Subject: Remove variadic macro invocation X-Git-Tag: libtirpc-0-2-4-rc2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9ce88a378679fd079ac4217e64173a729cde89b2;p=libtirpc Remove variadic macro invocation Commit f8104ba9 "Fix debugging reference from non-GSS to optional" GSS code.", Thu Apr 26 15:12:08 2012, introduces a variadic macro invocation (a GNU C extension) in the rpc/auth.h header. An attempt was made to hide the extension behind #ifdef __GNUC__ but the #else arm also uses the same synopsis, so the variadic macro is visible for non-GNU C compiles as well. With gcc (GCC) 4.7.2 20121109 (Red Hat 4.7.2-8) on Fedora 18, I see: /usr/include/tirpc/rpc/auth.h:255:32: warning: ISO C does not permit named variadic macros [-Wvariadic-macros] I imagine this warning is produced by the "-pedantic" gcc option, which I use in various projects that depend on libtirpc headers. Rather than further cluttering the code in auth.h, we can live without this debugging message. Cc: Nick Alcock Signed-off-by: Chuck Lever Signed-off-by: Steve Dickson --- diff --git a/tirpc/rpc/auth.h b/tirpc/rpc/auth.h index e7bbe36..4ce11f0 100644 --- a/tirpc/rpc/auth.h +++ b/tirpc/rpc/auth.h @@ -51,7 +51,6 @@ #include #include #include -#include #define MAX_AUTH_BYTES 400 @@ -249,19 +248,11 @@ auth_put(AUTH *auth) #define auth_refresh(auth, msg) \ ((*((auth)->ah_ops->ah_refresh))(auth, msg)) -#if defined(__GNUC__) && defined(DEBUG) -#define auth_log_debug(fmt,args...) printf(stderr, fmt, args) -#else -#define auth_log_debug(fmt,args...) -#endif - #define AUTH_DESTROY(auth) \ do { \ int refs; \ if ((refs = auth_put((auth))) == 0) \ ((*((auth)->ah_ops->ah_destroy))(auth));\ - auth_log_debug("%s: auth_put(), refs %d\n", \ - __func__, refs); \ } while (0) #define auth_destroy(auth) \ @@ -269,8 +260,6 @@ auth_put(AUTH *auth) int refs; \ if ((refs = auth_put((auth))) == 0) \ ((*((auth)->ah_ops->ah_destroy))(auth));\ - auth_log_debug("%s: auth_put(), refs %d\n", \ - __func__, refs); \ } while (0) #define AUTH_WRAP(auth, xdrs, xfunc, xwhere) \