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
* 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 */
/*
*/
#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)