Re: desperate c situation



On Fri, 2000-12-29 at 00:08:29, Fatih Demir wrote:

> I do get an error about "statements with no effect" in
>  gtranslator's CVS sources ( it's in the
>    gtranslator/libgtranslator/main.c file I've attached).
> 
> Why does gcc complain about an error there? I can't see
> (...)
>  bindtextdomain("gtranslator", GNOMELOCALEDIR);
>  textdomain("gtranslator");

Because both lines after preprocessing look like this:
("gtranslator");
and this _is_ expression statement with no effect.

Currently you're using useless macros bindtextdomain() and textdomain()
defined in libgnome/gnome-i18n.h. If you want to access real functions, you
should define ENABLE_NLS somewhere and this can be done be including
<config.h>.
Short answer: #include <config.h>

If you don't want to see warnings even with NLS disabled, cast these
epressions to void:
(void) textdomain("gtranslator");

Hope it helps.


Zbigniew




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