gconfig: remove misleading parentheses around a condition
authorNicolas Iooss <nicolas.iooss_linux@m4x.org>
Mon, 13 Mar 2017 19:33:41 +0000 (20:33 +0100)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 21 Mar 2017 17:56:33 +0000 (02:56 +0900)
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>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
scripts/kconfig/gconf.c

index 26d208b435a0d347b8f11df13bcb79cf3618770c..cfddddb9c9d722b63c522450a5b277a4fd22d318 100644 (file)
@@ -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);
                }