src: Silence all warnings

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Graf 2014-08-26 01:09:12 +02:00 committed by Thomas Haller
parent c231aa4159
commit 340d5d69c4
6 changed files with 9 additions and 15 deletions

View 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;

View 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);

View 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;

View 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);

View 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;
}

View 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();