]> www.infradead.org Git - users/jedix/linux-maple.git/commit
kconfig: nconf: get rid of (void) casts from wattrset() calls
authorMasahiro Yamada <masahiroy@kernel.org>
Sat, 10 Apr 2021 19:45:32 +0000 (04:45 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Mon, 12 Apr 2021 00:39:00 +0000 (09:39 +0900)
commit09176b4ec946d8dc0143069b58ebf45f8c49a5f9
tree10af57d3cf1da5a10199ac7210466c24fca32574
parenta0eedc6b164634a3ddad12d4b67e5f5a9a853dab
kconfig: nconf: get rid of (void) casts from wattrset() calls

This reverts commit 10175ba65fde ("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: Masahiro Yamada <masahiroy@kernel.org>
scripts/kconfig/nconf.c
scripts/kconfig/nconf.gui.c