]> git.ipfire.org Git - thirdparty/libnl.git/commitdiff
src: Silence all warnings
authorThomas Graf <tgraf@suug.ch>
Mon, 25 Aug 2014 23:09:12 +0000 (01:09 +0200)
committerThomas Haller <thaller@redhat.com>
Tue, 26 Aug 2014 11:09:20 +0000 (13:09 +0200)
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
src/nf-log.c
src/nf-queue.c
src/nl-monitor.c
src/nl-neightbl-list.c
src/nl-route-get.c
src/nl-rule-list.c

index c0cffe07b45a79640739685a8726239c75e63e6d..1e2c1e48ac1a65b176361d90bb23090f8d89960a 100644 (file)
@@ -52,7 +52,6 @@ int main(int argc, char *argv[])
 {
        struct nl_sock *nf_sock;
        struct nl_sock *rt_sock;
-        struct nl_cache *link_cache;
        struct nfnl_log *log;
        int copy_mode;
        uint32_t copy_range;
@@ -116,7 +115,7 @@ int main(int argc, char *argv[])
 
        rt_sock = nl_cli_alloc_socket();
        nl_cli_connect(rt_sock, NETLINK_ROUTE);
-       link_cache = nl_cli_link_alloc_cache(rt_sock);
+       nl_cli_link_alloc_cache(rt_sock);
 
        while (1) {
                fd_set rfds;
index 7151381d00ca6f06533d1818f5fe551800eaae3f..b043c80e4b3d2294a9b3cd44f802299014c6ba07 100644 (file)
@@ -60,7 +60,6 @@ static int event_input(struct nl_msg *msg, void *arg)
 int main(int argc, char *argv[])
 {
        struct nl_sock *rt_sock;
-       struct nl_cache *link_cache;
        struct nfnl_queue *queue;
        int copy_mode;
        uint32_t copy_range;
@@ -116,7 +115,7 @@ int main(int argc, char *argv[])
 
        rt_sock = nl_cli_alloc_socket();
        nl_cli_connect(rt_sock, NETLINK_ROUTE);
-       link_cache = nl_cli_link_alloc_cache(rt_sock);
+       nl_cli_link_alloc_cache(rt_sock);
 
        nl_socket_set_buffer_size(nf_sock, 1024*127, 1024*127);
 
index fdf649779b98680a903aaac3627f3eb90e4c7de3..16ecac00e04c3b5dfc825338d48bc2638fbe4de1 100644 (file)
@@ -35,7 +35,6 @@ static int event_input(struct nl_msg *msg, void *arg)
 int main(int argc, char *argv[])
 {
        struct nl_sock *sock;
-       struct nl_cache *link_cache;
        int err = 1;
        int i, idx;
 
@@ -92,7 +91,7 @@ int main(int argc, char *argv[])
                        fprintf(stderr, "Warning: Unknown group: %s\n", argv[idx]);
        }
 
-       link_cache = nl_cli_link_alloc_cache(sock);
+       nl_cli_link_alloc_cache(sock);
 
        while (1) {
                fd_set rfds;
index 5010b92d02b4e062e916d90edddb8753b50fe1c7..4c4230f18a0254043e7088ef238cf8cca0af557a 100644 (file)
@@ -28,7 +28,7 @@ static void print_usage(void)
 int main(int argc, char *argv[])
 {
        struct nl_sock *sock;
-       struct nl_cache *link_cache, *neightbl_cache;
+       struct nl_cache *neightbl_cache;
        struct nl_dump_params params = {
                .dp_type = NL_DUMP_LINE,
                .dp_fd = stdout,
@@ -36,7 +36,7 @@ int main(int argc, char *argv[])
  
        sock = nl_cli_alloc_socket();
        nl_cli_connect(sock, NETLINK_ROUTE);
-       link_cache = nl_cli_link_alloc_cache(sock);
+       nl_cli_link_alloc_cache(sock);
        neightbl_cache = nl_cli_alloc_cache(sock, "neighbour table",
                                            rtnl_neightbl_alloc_cache);
  
index 9d9a4484dcfb13d600bc034d2907e89ddf48dec7..1ee47e47d85a424208f57ac431960207bd15d001 100644 (file)
@@ -43,7 +43,6 @@ static int cb(struct nl_msg *msg, void *arg)
 int main(int argc, char *argv[])
 {
        struct nl_sock *sock;
-       struct nl_cache *link_cache, *route_cache;
        struct nl_addr *dst;
        int err = 1;
 
@@ -52,8 +51,8 @@ int main(int argc, char *argv[])
 
        sock = nl_cli_alloc_socket();
        nl_cli_connect(sock, NETLINK_ROUTE);
-       link_cache = nl_cli_link_alloc_cache(sock);
-       route_cache = nl_cli_route_alloc_cache(sock, 0);
+       nl_cli_link_alloc_cache(sock);
+       nl_cli_route_alloc_cache(sock, 0);
 
        dst = nl_cli_addr_parse(argv[1], AF_INET);
 
@@ -83,7 +82,5 @@ int main(int argc, char *argv[])
                        nl_cli_fatal(err, "%s", nl_geterror(err));
        }
 
-       //nl_cache_dump(route_cache, &params);
-
        return 0;
 }
index 8b474fa39fc8a3987921e1baf91123178ecb4e03..7c450e24c1e0e27892fe01872d99aa954e6f4346 100644 (file)
@@ -34,7 +34,7 @@ int main(int argc, char *argv[])
 {
        struct nl_sock *sock;
        struct rtnl_rule *rule;
-       struct nl_cache *link_cache, *rule_cache;
+       struct nl_cache *rule_cache;
        struct nl_dump_params params = {
                .dp_fd = stdout,
                .dp_type = NL_DUMP_LINE,
@@ -42,7 +42,7 @@ int main(int argc, char *argv[])
 
        sock = nl_cli_alloc_socket();
        nl_cli_connect(sock, NETLINK_ROUTE);
-       link_cache = nl_cli_link_alloc_cache(sock);
+       nl_cli_link_alloc_cache(sock);
        rule_cache = nl_cli_rule_alloc_cache(sock);
        rule = nl_cli_rule_alloc();