bug-hello
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnulib] yet another hello pretest


From: Bruno Haible
Subject: Re: [bug-gnulib] yet another hello pretest
Date: Fri, 10 Nov 2006 15:57:10 +0100
User-agent: KMail/1.9.1

Paul Eggert wrote:
> 2.  The "#if ENABLE_NLS" isn't needed, since gettext.h does the right
>     thing anyway.

> -#if ENABLE_NLS
>    /* Set the text message domain.  */
>    bindtextdomain (PACKAGE, LOCALEDIR);
>    textdomain (PACKAGE);
> -#endif

But with this, configuring with "./configure --disable-nls CPPFLAGS=-Wall",
I get warnings:

hello.c: In function 'main':
hello.c:53: warning: statement with no effect
hello.c:54: warning: statement with no effect

So, either add casts to void:

    /* Set the text message domain.  */
    (void) bindtextdomain (PACKAGE, LOCALEDIR);
    (void) textdomain (PACKAGE);

or add back the #if ENABLE_NLS.

Since these (void) casts make the code look ancient and are not very
understandable, my preferrence is for the #if ENABLE_NLS - it's clear
what it means.

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]