diff lib/regex_internal.h @ 17448:b3516a31a386

regex: port to --with-included-regex --enable-gcc-warnings non-threaded * lib/regex_internal.h (lock_fini, lock_lock): Rework to avoid gcc warnings in the non-threaded case. Reported by Charlie Brown in <http://lists.gnu.org/archive/html/bug-gnulib/2013-07/msg00015.html>.
author Paul Eggert <eggert@cs.ucla.edu>
date Tue, 09 Jul 2013 11:35:01 -0700
parents 6105f1dfb98e
children
line wrap: on
line diff
--- a/lib/regex_internal.h
+++ b/lib/regex_internal.h
@@ -72,8 +72,9 @@
 #else
 # define lock_define(name)
 # define lock_init(lock) 0
-# define lock_fini(lock) 0
-# define lock_lock(lock) ((void) 0)
+# define lock_fini(lock) ((void) 0)
+  /* The 'dfa' avoids an "unused variable 'dfa'" warning from GCC.  */
+# define lock_lock(lock) ((void) dfa)
 # define lock_unlock(lock) ((void) 0)
 #endif