svn rev #25142: trunk/src/lib/kdb/

raeburn@MIT.EDU raeburn at MIT.EDU
Sun Sep 4 19:52:21 EDT 2011


http://src.mit.edu/fisheye/changelog/krb5/?cs=25142
Commit By: raeburn
Log Message:
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.


Changed Files:
U   trunk/src/lib/kdb/iprop.x
U   trunk/src/lib/kdb/iprop_xdr.c
Modified: trunk/src/lib/kdb/iprop.x
===================================================================
--- trunk/src/lib/kdb/iprop.x	2011-09-04 23:52:11 UTC (rev 25141)
+++ trunk/src/lib/kdb/iprop.x	2011-09-04 23:52:21 UTC (rev 25142)
@@ -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 */
 
 /*

Modified: trunk/src/lib/kdb/iprop_xdr.c
===================================================================
--- trunk/src/lib/kdb/iprop_xdr.c	2011-09-04 23:52:11 UTC (rev 25141)
+++ trunk/src/lib/kdb/iprop_xdr.c	2011-09-04 23:52:21 UTC (rev 25142)
@@ -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)




More information about the cvs-krb5 mailing list