From 1e977172cabfffd4fe774b2f13101247bb0e720c Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Mon, 19 Aug 2013 07:47:56 +0000 Subject: remove dead assignments --- src/transport/gnunet-helper-transport-wlan-dummy.c | 4 ++-- src/transport/gnunet-helper-transport-wlan.c | 4 ++-- src/transport/plugin_transport_http_common.c | 3 +-- src/transport/plugin_transport_http_server.c | 4 ++-- src/transport/plugin_transport_tcp.c | 4 ---- src/transport/plugin_transport_udp.c | 5 +---- src/transport/plugin_transport_udp_broadcasting.c | 3 +-- src/transport/plugin_transport_unix.c | 3 +-- 8 files changed, 10 insertions(+), 20 deletions(-) diff --git a/src/transport/gnunet-helper-transport-wlan-dummy.c b/src/transport/gnunet-helper-transport-wlan-dummy.c index a7015ac2c..1e48d17e7 100644 --- a/src/transport/gnunet-helper-transport-wlan-dummy.c +++ b/src/transport/gnunet-helper-transport-wlan-dummy.c @@ -263,7 +263,7 @@ main (int argc, char *argv[]) } if (NULL == (fpout = fopen (FIFO_FILE2, "w"))) { - erg = mkfifo (FIFO_FILE2, 0666); + mkfifo (FIFO_FILE2, 0666); fpout = fopen (FIFO_FILE2, "w"); } if (NULL == fpout) @@ -277,7 +277,7 @@ main (int argc, char *argv[]) first = 0; if (NULL == (fpout = fopen (FIFO_FILE1, "w"))) { - erg = mkfifo (FIFO_FILE1, 0666); + mkfifo (FIFO_FILE1, 0666); fpout = fopen (FIFO_FILE1, "w"); } if (NULL == fpout) diff --git a/src/transport/gnunet-helper-transport-wlan.c b/src/transport/gnunet-helper-transport-wlan.c index 3ad4d64c4..b23f43dde 100644 --- a/src/transport/gnunet-helper-transport-wlan.c +++ b/src/transport/gnunet-helper-transport-wlan.c @@ -1482,7 +1482,7 @@ linux_read (struct HardwareInfos *dev, if (PRISM_STATUS_OK == pv.status) { ri->ri_noise = pv.data; - got_noise = 1; + /* got_noise = 1; */ } break; case PRISM_DID_RATE: @@ -1504,7 +1504,7 @@ linux_read (struct HardwareInfos *dev, if (PRISM_STATUS_OK == pv.status) { ri->ri_power = pv.data; - got_signal = 1; + /* got_signal = 1; */ } break; } diff --git a/src/transport/plugin_transport_http_common.c b/src/transport/plugin_transport_http_common.c index 4c64d2bf7..7a7f9ad0c 100644 --- a/src/transport/plugin_transport_http_common.c +++ b/src/transport/plugin_transport_http_common.c @@ -320,7 +320,6 @@ http_common_plugin_string_to_address (void *cls, address = NULL; plugin = NULL; optionstr = NULL; - options = 0; if ((NULL == addr) || (addrlen == 0)) { GNUNET_break (0); @@ -346,7 +345,7 @@ http_common_plugin_string_to_address (void *cls, } optionstr[0] = '\0'; optionstr ++; - options = atol (optionstr); + options = atol (optionstr); /* 0 on conversion error, that's ok */ address = strchr (optionstr, '.'); if (NULL == address) { diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c index 56477625f..abf3fdacd 100644 --- a/src/transport/plugin_transport_http_server.c +++ b/src/transport/plugin_transport_http_server.c @@ -1424,7 +1424,7 @@ server_access_cb (void *cls, struct MHD_Connection *mhd_connection, response = MHD_create_response_from_data (strlen ("Thank you!"), "Thank you!", MHD_NO, MHD_NO); - res = MHD_queue_response (mhd_connection, MHD_HTTP_OK, response); + MHD_queue_response (mhd_connection, MHD_HTTP_OK, response); MHD_destroy_response (response); return MHD_YES; } @@ -1472,7 +1472,7 @@ server_access_cb (void *cls, struct MHD_Connection *mhd_connection, response = MHD_create_response_from_data (strlen ("Thank you!"), "Thank you!", MHD_NO, MHD_NO); - res = MHD_queue_response (mhd_connection, MHD_HTTP_OK, response); + MHD_queue_response (mhd_connection, MHD_HTTP_OK, response); MHD_destroy_response (response); return MHD_YES; } diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index b1c4cab2b..37a4aa7cd 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c @@ -597,7 +597,6 @@ tcp_address_to_string (void *cls, const void *addr, size_t addrlen) uint16_t port; uint32_t options; - options = 0; switch (addrlen) { case sizeof (struct IPv6TcpAddress): @@ -665,7 +664,6 @@ tcp_string_to_address (void *cls, const char *addr, uint16_t addrlen, address = NULL; plugin = NULL; optionstr = NULL; - options = 0; if ((NULL == addr) || (addrlen == 0)) { GNUNET_break (0); @@ -1735,8 +1733,6 @@ tcp_plugin_address_pretty_printer (void *cls, const char *type, uint16_t port; uint32_t options; - - options = 0; if (addrlen == sizeof (struct IPv6TcpAddress)) { t6 = addr; diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 46804ba1d..90053b575 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c @@ -559,7 +559,6 @@ udp_address_to_string (void *cls, const void *addr, size_t addrlen) uint16_t port; uint32_t options; - options = 0; if (addrlen == sizeof (struct IPv6UdpAddress)) { t6 = addr; @@ -622,7 +621,7 @@ udp_string_to_address (void *cls, const char *addr, uint16_t addrlen, address = NULL; plugin = NULL; optionstr = NULL; - options = 0; + if ((NULL == addr) || (addrlen == 0)) { GNUNET_break (0); @@ -795,7 +794,6 @@ udp_plugin_address_pretty_printer (void *cls, const char *type, uint16_t port; uint32_t options; - options = 0; if (addrlen == sizeof (struct IPv6UdpAddress)) { u6 = addr; @@ -1256,7 +1254,6 @@ disconnect_session (struct Session *s) call_continuation(udpw, GNUNET_SYSERR); GNUNET_free (udpw); } - udpw = next; } plugin->env->session_end (plugin->env->cls, &s->target, s); diff --git a/src/transport/plugin_transport_udp_broadcasting.c b/src/transport/plugin_transport_udp_broadcasting.c index 4b220d156..1f26706d4 100644 --- a/src/transport/plugin_transport_udp_broadcasting.c +++ b/src/transport/plugin_transport_udp_broadcasting.c @@ -272,7 +272,7 @@ udp_ipv4_broadcast_send (void *cls, plugin->send_ipv4_broadcast_task = GNUNET_SCHEDULER_NO_TASK; msg_size = prepare_beacon(plugin, (struct UDP_Beacon_Message *) &buf); - sent = 0; + baddr = plugin->ipv4_broadcast_head; /* just IPv4 */ while ((msg_size > 0) && (baddr != NULL) && (baddr->addrlen == sizeof (struct sockaddr_in))) @@ -324,7 +324,6 @@ udp_ipv6_broadcast_send (void *cls, plugin->send_ipv6_broadcast_task = GNUNET_SCHEDULER_NO_TASK; msg_size = prepare_beacon(plugin, (struct UDP_Beacon_Message *) &buf); - sent = 0; sent = GNUNET_NETWORK_socket_sendto (plugin->sockv6, &buf, msg_size, (const struct sockaddr *) &plugin->ipv6_multicast_address, diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c index 211408f18..5cf9c5125 100644 --- a/src/transport/plugin_transport_unix.c +++ b/src/transport/plugin_transport_unix.c @@ -610,7 +610,6 @@ unix_real_send (void *cls, resend: /* Send the data */ - sent = 0; sent = GNUNET_NETWORK_socket_sendto (send_handle, msgbuf, msgbuf_size, sb, sbs); if (GNUNET_SYSERR == sent) @@ -1440,7 +1439,7 @@ unix_string_to_address (void *cls, const char *addr, uint16_t addrlen, address = NULL; plugin = NULL; optionstr = NULL; - options = 0; + if ((NULL == addr) || (addrlen == 0)) { GNUNET_break (0); -- cgit v1.2.3