]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
intl: Pacify compilation with pre-C99 compilers
authorDaiki Ueno <ueno@gnu.org>
Fri, 21 Aug 2015 01:22:01 +0000 (10:22 +0900)
committerDaiki Ueno <ueno@gnu.org>
Fri, 21 Aug 2015 01:22:01 +0000 (10:22 +0900)
* loadmsgcat.c (_nl_load_domain): Move the call to
__libc_lock_define_initialized_recursive to the end of local
variable declarations to avoid extra ';' being expanded to an
empty statement.
Reported by pan7 in:
<http://savannah.gnu.org/support/?108864>.

gettext-runtime/intl/ChangeLog
gettext-runtime/intl/loadmsgcat.c

index 5cb5fda4c1078d2250f654ba1e2c432de21f1341..751b65b589733901834ef1ddb6bf567351a91f27 100644 (file)
@@ -1,3 +1,13 @@
+2015-08-21  Daiki Ueno  <ueno@gnu.org>
+
+       intl: Pacify compilation with pre-C99 compilers
+       * loadmsgcat.c (_nl_load_domain): Move the call to
+       __libc_lock_define_initialized_recursive to the end of local
+       variable declarations to avoid extra ';' being expanded to an
+       empty statement.
+       Reported by pan7 in:
+       <http://savannah.gnu.org/support/?108864>.
+
 2015-07-10  Daiki Ueno  <ueno@gnu.org>
 
        * gettext 0.19.5 released.
index 8eb77d8fe9cdc69b68fff45da01b7971c6a873ce..3d535ac37b7bce5960059baf5bb651956a946532 100644 (file)
@@ -785,7 +785,6 @@ internal_function
 _nl_load_domain (struct loaded_l10nfile *domain_file,
                 struct binding *domainbinding)
 {
-  __libc_lock_define_initialized_recursive (static, lock);
   int fd = -1;
   size_t size;
 #ifdef _LIBC
@@ -799,6 +798,7 @@ _nl_load_domain (struct loaded_l10nfile *domain_file,
   int revision;
   const char *nullentry;
   size_t nullentrylen;
+  __libc_lock_define_initialized_recursive (static, lock);
 
   __libc_lock_lock_recursive (lock);
   if (domain_file->decided != 0)