]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
iw: fix enum warnings
authorBrian Norris <briannorris@chromium.org>
Mon, 8 Oct 2018 17:51:26 +0000 (10:51 -0700)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 9 Oct 2018 07:57:53 +0000 (09:57 +0200)
clang warns about the misuse of enums:

reg.c:246:26: warning: implicit conversion from enumeration type 'enum command_identify_by' to different enumeration type 'enum id_input' [-Wenum-conversion]
        err = handle_cmd(state, CIB_NONE, 2, dump_args);
              ~~~~~~~~~~        ^~~~~~~~
info.c:645:26: warning: implicit conversion from enumeration type 'enum command_identify_by' to different enumeration type 'enum id_input' [-Wenum-conversion]
        err = handle_cmd(state, CIB_NONE, 2, feat_args);
              ~~~~~~~~~~        ^~~~~~~~

Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
info.c
reg.c

diff --git a/info.c b/info.c
index fbf3ee095f9c451d352f1d22e59349b46947ec2f..d0577e32552e34370848eff8d50a1cef864a545b 100644 (file)
--- a/info.c
+++ b/info.c
@@ -718,7 +718,7 @@ static int handle_info(struct nl80211_state *state,
        char *feat_args[] = { "features", "-q" };
        int err;
 
-       err = handle_cmd(state, CIB_NONE, 2, feat_args);
+       err = handle_cmd(state, II_NONE, 2, feat_args);
        if (!err && nl80211_has_split_wiphy) {
                nla_put_flag(msg, NL80211_ATTR_SPLIT_WIPHY_DUMP);
                nlmsg_hdr(msg)->nlmsg_flags |= NLM_F_DUMP;
diff --git a/reg.c b/reg.c
index cadff3884c041c2a9b615701c939771119854929..a2368df390099dec5167c0376a7c884d6aa950a2 100644 (file)
--- a/reg.c
+++ b/reg.c
@@ -243,7 +243,7 @@ static int handle_reg_get(struct nl80211_state *state,
        char *dump_args[] = { "reg", "dump" };
        int err;
 
-       err = handle_cmd(state, CIB_NONE, 2, dump_args);
+       err = handle_cmd(state, II_NONE, 2, dump_args);
        /*
         * dump might fail since it's not supported on older kernels,
         * in that case the handler is still registered already