The attached patch is taken from coreutils, which uses it to avoid unused-local-variable warnings when compiling regexec.c.
Created attachment 603 [details] avoid uninitialized-variable warnings
This isn't necessarily correct. If, as suggested in another bug, the __libc_loc_* definitions are moved into a separate file where they are defined by the project using the code, then there can be locking operations defined. The correct way to do this is define a macro which indicates locking is used.
No reply in 6+ months. Closing.