lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <481D344C.9080904@tabi.org>
Date:	Sat, 03 May 2008 22:58:04 -0500
From:	Timur Tabi <timur@...i.org>
To:	linux-kernel@...r.kernel.org
Subject: mconf.c and bindtextdomain() -- warnings while cross-compiling on
 OS X

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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ