]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
fix sparse warnings
authorJohannes Berg <johannes@sipsolutions.net>
Mon, 8 Dec 2008 17:30:22 +0000 (18:30 +0100)
committerJohannes Berg <johannes@sipsolutions.net>
Mon, 8 Dec 2008 17:30:22 +0000 (18:30 +0100)
genl.c
iw.c
mesh.c
reg.c

diff --git a/genl.c b/genl.c
index 8f83d138d69cb6229c33d80c1a202a3036369c20..e99ea9d5968fe2e1bc7901da2d6e779a67c2e63a 100644 (file)
--- a/genl.c
+++ b/genl.c
@@ -9,6 +9,8 @@
 #include <netlink/msg.h>
 #include <netlink/attr.h>
 
+#include "iw.h"
+
 static int error_handler(struct sockaddr_nl *nla, struct nlmsgerr *err,
                         void *arg)
 {
diff --git a/iw.c b/iw.c
index 5859180768db448fbe5511301d5d0c96f7db601c..7396052df8e575157ee83ab68a7bd64bb2c5c52d 100644 (file)
--- a/iw.c
+++ b/iw.c
@@ -23,7 +23,7 @@
 #include "iw.h"
 #include "version.h"
 
-int debug = 0;
+static int debug = 0;
 
 static int nl80211_init(struct nl80211_state *state)
 {
diff --git a/mesh.c b/mesh.c
index d1164226fc851d45fb5fcb6becc93f85c5ba6a5d..d6edf3fcba8aff9a8b899f111ffd4cee8731e674 100644 (file)
--- a/mesh.c
+++ b/mesh.c
@@ -93,32 +93,32 @@ static uint32_t _parse_u32(const char *str, _any *ret)
        return 0;
 }
 
-void _print_u8(struct nlattr *a)
+static void _print_u8(struct nlattr *a)
 {
        printf("%d", nla_get_u8(a));
 }
 
-void _print_u16(struct nlattr *a)
+static void _print_u16(struct nlattr *a)
 {
        printf("%d", nla_get_u16(a));
 }
 
-void _print_u16_timeout(struct nlattr *a)
+static void _print_u16_timeout(struct nlattr *a)
 {
        printf("%d milliseconds", nla_get_u16(a));
 }
 
-void _print_u16_in_TUs(struct nlattr *a)
+static void _print_u16_in_TUs(struct nlattr *a)
 {
        printf("%d TUs", nla_get_u16(a));
 }
 
-void _print_u32_timeout(struct nlattr *a)
+static void _print_u32_timeout(struct nlattr *a)
 {
        printf("%u milliseconds", nla_get_u32(a));
 }
 
-void _print_u32_in_TUs(struct nlattr *a)
+static void _print_u32_in_TUs(struct nlattr *a)
 {
        printf("%d TUs", nla_get_u32(a));
 }
@@ -213,6 +213,7 @@ static int set_interface_meshparam(struct nl_cb *cb,
        int err;
        uint32_t ret;
        const struct mesh_param_descr *mdescr;
+       struct nlattr *container;
        _any any;
 
        mdescr = find_mesh_param(argc, argv, "change");
@@ -233,8 +234,7 @@ static int set_interface_meshparam(struct nl_cb *cb,
        }
 
        /* Construct a netlink message */
-       struct nlattr *container =
-               nla_nest_start(msg, NL80211_ATTR_MESH_PARAMS);
+       container = nla_nest_start(msg, NL80211_ATTR_MESH_PARAMS);
        if (!container)
                return -ENOBUFS;
        err = mdescr->nla_put_fn(msg, mdescr->mesh_param_num, &any);
diff --git a/reg.c b/reg.c
index e8d46a5309bc8d40895141e8d2c07c5e4f9af169..01573d3c534269ffedf49abc2e681be19726a7b5 100644 (file)
--- a/reg.c
+++ b/reg.c
@@ -11,7 +11,7 @@
 #include "nl80211.h"
 #include "iw.h"
 
-int isalpha_upper(char letter)
+static int isalpha_upper(char letter)
 {
        if (letter >= 65 && letter <= 90)
                return 1;