diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2013-06-17 09:24:23 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-06-17 09:24:23 +0200 |
commit | 94eb17efbd1ec81187fced585ab05ad0d0eb555c (patch) | |
tree | 9b94ecdb98e152db187d21066cb47d26185fe724 | |
parent | afc080bf645a0ae5dc3ad09b306fc5d805653ce5 (diff) |
ax25dump: Fix warning about set but not used variables.
gcc -DHAVE_CONFIG_H -I. -I.. -O2 -Wall -Wno-pointer-sign -MT ax25dump.o -MD
-MP -MF .deps/ax25dump.Tpo -c -o ax25dump.o ax25dump.c
ax25dump.c: In function ‘ax25_dump’:
ax25dump.c:170:10: warning: ‘ns’ may be used uninitialized in this function [-Wmaybe-uninitialized]
ax25dump.c:167:10: warning: ‘nr’ may be used uninitialized in this function [-Wmaybe-uninitialized]
GCC isn't quite smart enough to figure out that this warning is bogus.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | listen/ax25dump.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/listen/ax25dump.c b/listen/ax25dump.c index a7b696c..5a870b7 100644 --- a/listen/ax25dump.c +++ b/listen/ax25dump.c @@ -373,6 +373,8 @@ char *pax25(char *buf, unsigned char *data) static int ftype(unsigned char *data, int *type, int *ns, int *nr, int *pf, int extseq) { + *ns = *nr = 0; /* To avoid warnings */ + if (extseq) { if ((*data & 0x01) == 0) { /* An I frame is an I-frame ... */ *type = I; |