From: Ken Raeburn Date: Sun, 4 Sep 2011 23:52:21 +0000 (+0000) Subject: Skip redundant inclusion of iprop.h X-Git-Tag: krb5-1.10-alpha1~233 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=10aadcfc4b54e8bea170998db37cad34fd94d3f2;p=krb5.git Skip redundant inclusion of iprop.h Suppress GCC's unused-variable diagnostic for purely generated code using outside tools, known to have that issue but not ours to fix. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25142 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/kdb/iprop.x b/src/lib/kdb/iprop.x index 82ffdfe05..b04a453ed 100644 --- a/src/lib/kdb/iprop.x +++ b/src/lib/kdb/iprop.x @@ -18,8 +18,22 @@ * kadmin/server/ipropd_svc.c */ +/* + * This file gets fed through the preprocessor to handle RPC_* + * symbols, but we don't want it to chew on __GNUC__ in this phase. + */ +#undef __GNUC__ + #ifdef RPC_XDR -%#include "iprop.h" +/* + * Sloppy rpcgen code declares "buf" and rarely uses it. As it's + * generated code, and not presented to code building against the + * Kerberos code, it's not a problem we need to fix, so suppress the + * complaint. + */ +%#ifdef __GNUC__ +%#pragma GCC diagnostic ignored "-Wunused-variable" +%#endif #endif /* RPC_XDR */ /* diff --git a/src/lib/kdb/iprop_xdr.c b/src/lib/kdb/iprop_xdr.c index 093c05676..2ab59f570 100644 --- a/src/lib/kdb/iprop_xdr.c +++ b/src/lib/kdb/iprop_xdr.c @@ -5,7 +5,9 @@ */ #include "iprop.h" -#include "iprop.h" +#ifdef __GNUC__ +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif bool_t xdr_int16_t (XDR *xdrs, int16_t *objp)