From: Daiki Ueno Date: Fri, 21 Aug 2015 01:22:01 +0000 (+0900) Subject: intl: Pacify compilation with pre-C99 compilers X-Git-Tag: v0.19.6~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2929cd21f36be2fb4cf1165dd2329a2715f32c87;p=thirdparty%2Fgettext.git 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: . --- diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index 5cb5fda4c..751b65b58 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,13 @@ +2015-08-21 Daiki Ueno + + 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: + . + 2015-07-10 Daiki Ueno * gettext 0.19.5 released. diff --git a/gettext-runtime/intl/loadmsgcat.c b/gettext-runtime/intl/loadmsgcat.c index 8eb77d8fe..3d535ac37 100644 --- a/gettext-runtime/intl/loadmsgcat.c +++ b/gettext-runtime/intl/loadmsgcat.c @@ -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)