Skip to content
Commit 2ba50da9 authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

kconfig: nconf: get rid of (void) casts from wattrset() calls

This reverts commit 10175ba6 ("nconfig: Silence unused return values
from wattrset").

With this patch applied, recent GCC versions can cleanly build nconf
without "value computed is not used" warnings.

The wattrset() used to be implemented as a macro, like this:

  #define wattrset(win,at) \
          (NCURSES_OK_ADDR(win) \
            ? ((win)->_attrs = NCURSES_CAST(attr_t, at), \
               OK) \
            : ERR)

The GCC bugzilla [1] reported a false-positive -Wunused-value warning
in a similar test case. It was fixed by GCC 4.4.1.

Let's revert that commit, and see if somebody will claim the issue.

[1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39889



Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent 7f5ff55b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment