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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E8C72B6.9030603@suse.cz>
Date:	Wed, 05 Oct 2011 17:07:34 +0200
From:	Michal Marek <mmarek@...e.cz>
To:	Sanjeev Premi <premi@...com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kconfig: fix warnings due to unused return values

On 22.9.2011 13:36, Sanjeev Premi wrote:
> The return value of wattrset() is being ignored in the
> code and newer compilers complain about this e.g.
> 
> HOSTCC  scripts/kconfig/lxdialog/checklist.o
> scripts/kconfig/lxdialog/checklist.c: In function print_item:
> scripts/kconfig/lxdialog/checklist.c:40: warning: value computed is not used
> scripts/kconfig/lxdialog/checklist.c:46: warning: value computed is not used
> 
> Let the compiler know that ignore is intentional.
> 
> Signed-off-by: Sanjeev Premi <premi@...com>
> ---
> 
>   The patch was created against the last pull from git.kernel.org
>   The 'pull' from github is taking more than few hours...
> 
>   Based on the time stamps at this url, I believe the patch should
>   apply cleanly:
>    https://github.com/torvalds/linux/tree/master/scripts/kconfig/lxdialog

The latest kconfig tree is at http://repo.or.cz/w/linux-kbuild.git,
branch kconfig. You can pull it by

$ git fetch git://repo.or.cz/linux-kbuild.git kconfig:kconfig

> diff --git a/scripts/kconfig/lxdialog/checklist.c b/scripts/kconfig/lxdialog/checklist.c
> index a2eb80f..8407849 100644
> --- a/scripts/kconfig/lxdialog/checklist.c
> +++ b/scripts/kconfig/lxdialog/checklist.c
> @@ -37,20 +37,20 @@ static void print_item(WINDOW * win, int choice, int selected)
>  	list_item[list_width - item_x] = '\0';
>  
>  	/* Clear 'residue' of last item */
> -	wattrset(win, dlg.menubox.atr);
> +	(void)wattrset(win, dlg.menubox.atr);
>  	wmove(win, choice, 0);
>  	for (i = 0; i < list_width; i++)
>  		waddch(win, ' ');
>  
>  	wmove(win, choice, check_x);
> -	wattrset(win, selected ? dlg.check_selected.atr
> +	(void)wattrset(win, selected ? dlg.check_selected.atr

Uhm, not pretty. What ncurses version are you using? Can you post the
output of make V=1 menuconfig? It seems like wattrset is defined as a
macro instead of a function call. FWIW, it does not print any warnings
here with

$ rpm -qf /usr/include/ncurses
ncurses-devel-5.8-2.6.x86_64
and
gcc version 4.6.1 20110801 [gcc-4_6-branch revision 177033] (SUSE Linux)

on openSUSE Factory.

Michal
--
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