From 10aadcfc4b54e8bea170998db37cad34fd94d3f2 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Sun, 4 Sep 2011 23:52:21 +0000 Subject: [PATCH] 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 --- src/lib/kdb/iprop.x | 16 +++++++++++++++- src/lib/kdb/iprop_xdr.c | 4 +++- 2 files changed, 18 insertions(+), 2 deletions(-) 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) -- 2.26.2