linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] gconfig: remove misleading parentheses around a condition
@ 2017-03-13 19:33 Nicolas Iooss
  2017-03-21 17:58 ` Masahiro Yamada
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Iooss @ 2017-03-13 19:33 UTC (permalink / raw)
  To: Yann E. MORIN, linux-kbuild; +Cc: linux-kernel, Nicolas Iooss

When building the kernel with clang, the compiler complains about the
presence of a condition inside two pairs of parentheses:

    scripts/kconfig/gconf.c:917:19: error: equality comparison with
    extraneous parentheses [-Werror,-Wparentheses-equality]
                    } else if ((col == COL_OPTION)) {
                                ~~~~^~~~~~~~~~~~~
    scripts/kconfig/gconf.c:917:19: note: remove extraneous parentheses
    around the comparison to silence this warning
                    } else if ((col == COL_OPTION)) {
                               ~    ^            ~
    scripts/kconfig/gconf.c:917:19: note: use '=' to turn this equality
    comparison into an assignment
                    } else if ((col == COL_OPTION)) {
                                    ^~
                                    =

Silence this warning by removing a level of parentheses.

Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
---
 scripts/kconfig/gconf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index 26d208b435a0..cfddddb9c9d7 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -914,7 +914,7 @@ on_treeview2_button_press_event(GtkWidget * widget,
 			current = menu;
 			display_tree_part();
 			gtk_widget_set_sensitive(back_btn, TRUE);
-		} else if ((col == COL_OPTION)) {
+		} else if (col == COL_OPTION) {
 			toggle_sym_value(menu);
 			gtk_tree_view_expand_row(view, path, TRUE);
 		}
-- 
2.12.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] gconfig: remove misleading parentheses around a condition
  2017-03-13 19:33 [PATCH 1/1] gconfig: remove misleading parentheses around a condition Nicolas Iooss
@ 2017-03-21 17:58 ` Masahiro Yamada
  0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2017-03-21 17:58 UTC (permalink / raw)
  To: Nicolas Iooss
  Cc: Yann E. MORIN, Linux Kbuild mailing list, Linux Kernel Mailing List

2017-03-14 4:33 GMT+09:00 Nicolas Iooss <nicolas.iooss_linux@m4x.org>:
> When building the kernel with clang, the compiler complains about the
> presence of a condition inside two pairs of parentheses:
>
>     scripts/kconfig/gconf.c:917:19: error: equality comparison with
>     extraneous parentheses [-Werror,-Wparentheses-equality]
>                     } else if ((col == COL_OPTION)) {
>                                 ~~~~^~~~~~~~~~~~~
>     scripts/kconfig/gconf.c:917:19: note: remove extraneous parentheses
>     around the comparison to silence this warning
>                     } else if ((col == COL_OPTION)) {
>                                ~    ^            ~
>     scripts/kconfig/gconf.c:917:19: note: use '=' to turn this equality
>     comparison into an assignment
>                     } else if ((col == COL_OPTION)) {
>                                     ^~
>                                     =
>
> Silence this warning by removing a level of parentheses.
>
> Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>


Applied to linux-kbuild/fixes.   Thanks!


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-21 18:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-13 19:33 [PATCH 1/1] gconfig: remove misleading parentheses around a condition Nicolas Iooss
2017-03-21 17:58 ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).