From fa1d33cf060b3882e8fdac2c9c8271731f668316 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sun, 7 Jun 2015 01:11:15 +0200 Subject: netrom/netromt.c: Fix warning about set but unused variable. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -g -O2 -Wall -MT netromt.o -MD -MP -MF .deps/netromt.Tpo -c -o netromt.o netromt.c netromt.c: In function ‘build_others’: netromt.c:102:13: warning: variable ‘number’ set but not used [-Wunused-but-set-variable] int which, number, quality, neigh_no, obs_count; ^ netromt.c:102:6: warning: variable ‘which’ set but not used [-Wunused-but-set-variable] int which, number, quality, neigh_no, obs_count; ^ Signed-off-by: Ralf Baechle --- netrom/netromt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/netrom/netromt.c b/netrom/netromt.c index 17c17c3..064b7d3 100644 --- a/netrom/netromt.c +++ b/netrom/netromt.c @@ -99,7 +99,7 @@ static void build_others(int s, int min_obs, struct full_sockaddr_ax25 *dest, in char nodes_buffer[90]; char neigh_buffer[90]; char *callsign, *mnemonic, *neighbour; - int which, number, quality, neigh_no, obs_count; + int quality, neigh_no, obs_count; int olen, len; if ((fpnodes = fopen(PROC_NR_NODES_FILE, "r")) == NULL) { @@ -123,8 +123,8 @@ static void build_others(int s, int min_obs, struct full_sockaddr_ax25 *dest, in while (fgets(nodes_buffer, 90, fpnodes) != NULL) { callsign = strtok(nodes_buffer, " "); mnemonic = strtok(NULL, " "); - which = atoi(strtok(NULL, " ")); - number = atoi(strtok(NULL, " ")); + (void) strtok(NULL, " "); /* skip which field */ + (void) strtok(NULL, " "); /* skip number field */ quality = atoi(strtok(NULL, " ")); obs_count = atoi(strtok(NULL, " ")); neigh_no = atoi(strtok(NULL, " ")); -- cgit v1.2.3