]> granicus.if.org Git - sudo/commitdiff
Add ignore_result definition to AH_BOTTOM
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 29 Mar 2012 17:13:38 +0000 (13:13 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 29 Mar 2012 17:13:38 +0000 (13:13 -0400)
configure.in

index 8ee0788a1da96ef99cf3b5abd55ff32d361e426e..a5f28c377e7edd06076f46919d5e1f93944aca59 100644 (file)
@@ -3407,6 +3407,15 @@ AH_BOTTOM([/*
 # endif /* HAVE_ST_MTIMESPEC */
 #endif /* HAVE_ST_MTIM */
 
+#ifdef __GNUC__
+# define ignore_result(x) do {                                                \
+    __typeof__(x) y = (x);                                                    \
+    (void)y;                                                                  \
+} while(0)
+#else
+# define ignore_result(x)      (void)(x)
+#endif
+
 /* GNU stow needs /etc/sudoers to be a symlink. */
 #ifdef USE_STOW
 # define stat_sudoers  stat