From: Timur Tabi <timur@tabi.org>
To: linux-kernel@vger.kernel.org
Subject: mconf.c and bindtextdomain() -- warnings while cross-compiling on OS X
Date: Sat, 03 May 2008 22:58:04 -0500 [thread overview]
Message-ID: <481D344C.9080904@tabi.org> (raw)
I'm cross-compiling the kernel on an OS X system, and when I run "make
menuconfig", I get this warning:
HOSTCC scripts/kconfig/mconf.o
scripts/kconfig/mconf.c: In function ‘main’:
scripts/kconfig/mconf.c:871: warning: statement with no effect
scripts/kconfig/mconf.c:872: warning: statement with no effect
Here is the code in question:
int main(int ac, char **av)
{
int saved_x, saved_y;
char *mode;
int res;
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR); <--- line 871
textdomain(PACKAGE);
I believe the warnings are from this code in lkc.h:
#ifndef KBUILD_NO_NLS
# include <libintl.h>
#else
# define gettext(Msgid) ((const char *) (Msgid))
# define textdomain(Domainname) ((const char *) (Domainname))
# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
#endif
Can someone explain to me why this macros are defined in this way? Every
place where textdomain() and bindtext() are used, they are used like this:
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
In other words, the return value from these macros is never used, so the
warning is inevitable.
I think the code in lkc.h should be changed to:
# define textdomain(Domainname) do {} while(0)
# define bindtextdomain(Domainname, Dirname) do {} while(0)
I can't say for certain whether this is a good idea, though, because I'm
not at all familiar with this code.
next reply other threads:[~2008-05-04 3:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-04 3:58 Timur Tabi [this message]
2008-05-04 7:33 ` Sam Ravnborg
2008-05-04 18:42 ` Timur Tabi
2008-05-04 19:08 ` Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=481D344C.9080904@tabi.org \
--to=timur@tabi.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome