[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Trivial patches to silence -Wundef
From: |
Bruno Haible |
Subject: |
Re: Trivial patches to silence -Wundef |
Date: |
Sat, 22 Apr 2017 12:11:56 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-72-generic; KDE/5.18.0; x86_64; ; ) |
Hi,
Gisle Vanem wrote:
> I get:
> xbinary-io.c(34): warning C4047: 'function': 'const char *' differs in
> levels of indirection from 'int'
> xbinary-io.c(34): warning C4024: 'error': different types for formal and
> actual parameter 3
Fixed by the patch below. Thanks for reporting this.
> Where is '_(x)' defined if ENABLE_NLS is not defined?
_(x) ought to be defined by the file that uses it.
ENABLE_NLS does not need to be considered by this file; it is already taken
into account by gettext.h.
2017-04-22 Bruno Haible <address@hidden>
xbinary-io: Fix build error.
* modules/xbinary-io (Depends-on): Add gettext-h.
* lib/xbinary-io.c: Include gettext.h and define _().
Reported by Gisle Vanem <address@hidden> in
<https://lists.gnu.org/archive/html/bug-gnulib/2017-04/msg00089.html>.
diff --git a/modules/xbinary-io b/modules/xbinary-io
index 5344805..7618e37 100644
--- a/modules/xbinary-io
+++ b/modules/xbinary-io
@@ -10,6 +10,7 @@ binary-io
error
exitfail
extern-inline
+gettext-h
stdbool
verify
diff --git a/lib/xbinary-io.c b/lib/xbinary-io.c
index 7f765f1..b51566b 100644
--- a/lib/xbinary-io.c
+++ b/lib/xbinary-io.c
@@ -25,6 +25,9 @@
#include "exitfail.h"
#include "verify.h"
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
#if O_BINARY
_Noreturn void