From: Bruno Haible Date: Fri, 2 Jun 2023 23:26:37 +0000 (+0200) Subject: intl: Silence warnings "no previous prototype" and "nested extern declaration". X-Git-Tag: v0.22~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d385a1cfad740fbc2b0a773798c98787107e91f4;p=thirdparty%2Fgettext.git intl: Silence warnings "no previous prototype" and "nested extern declaration". * gettext-runtime/intl/gettextP.h (_nl_log_untranslated): New declaration. * gettext-runtime/intl/dcigettext.c: Remove nested declaration of _nl_log_untranslated. * gettext-runtime/intl/log.c: Include gettextP.h. --- diff --git a/gettext-runtime/intl/dcigettext.c b/gettext-runtime/intl/dcigettext.c index 277bb061f..7c122b1e4 100644 --- a/gettext-runtime/intl/dcigettext.c +++ b/gettext-runtime/intl/dcigettext.c @@ -904,10 +904,6 @@ DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2, #ifndef _LIBC if (!ENABLE_SECURE) { - extern void _nl_log_untranslated (const char *logfilename, - const char *domainname, - const char *msgid1, const char *msgid2, - int plural); const char *logfilename = getenv ("GETTEXT_LOG_UNTRANSLATED"); if (logfilename != NULL && logfilename[0] != '\0') diff --git a/gettext-runtime/intl/gettextP.h b/gettext-runtime/intl/gettextP.h index de34a968c..e8e1edd9a 100644 --- a/gettext-runtime/intl/gettextP.h +++ b/gettext-runtime/intl/gettextP.h @@ -292,6 +292,11 @@ extern const char _nl_default_default_domain[] attribute_hidden; /* Default text domain in which entries for gettext(3) are to be found. */ extern const char *_nl_current_default_domain attribute_hidden; +extern void _nl_log_untranslated (const char *logfilename, + const char *domainname, + const char *msgid1, const char *msgid2, + int plural); + /* @@ begin of epilog @@ */ #endif /* gettextP.h */ diff --git a/gettext-runtime/intl/log.c b/gettext-runtime/intl/log.c index aea66e86b..ae0e22835 100644 --- a/gettext-runtime/intl/log.c +++ b/gettext-runtime/intl/log.c @@ -1,5 +1,5 @@ /* Log file output. - Copyright (C) 2003, 2005, 2009, 2021 Free Software Foundation, Inc. + Copyright (C) 2003, 2005, 2009, 2021, 2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -20,6 +20,9 @@ # include #endif +/* Specification. */ +#include "gettextP.h" + #include #include #include