summaryrefslogtreecommitdiffstats
path: root/netrom
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2015-06-07 01:11:15 +0200
committerRalf Baechle <ralf@linux-mips.org>2015-06-07 01:11:15 +0200
commitfa1d33cf060b3882e8fdac2c9c8271731f668316 (patch)
tree36c850144e0deefb93e9821e6bdc96aed1453894 /netrom
parent10233ed2e04c1ac21be6335203e7c027a3df8c87 (diff)
netrom/netromt.c: Fix warning about set but unused variable.
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 <ralf@linux-mips.org>
Diffstat (limited to 'netrom')
-rw-r--r--netrom/netromt.c6
1 files 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, " "));