diff options
author | RALOVICH, Kristof <tade60@freemail.hu> | 2015-10-07 23:05:48 +0200 |
---|---|---|
committer | RALOVICH, Kristof <tade60@freemail.hu> | 2015-10-07 23:05:48 +0200 |
commit | 102ca98cc8315a34ede549a02378dbe6ccfe929e (patch) | |
tree | 3b6ad55da3d08075c085a945faaed729fc083fbc | |
parent | 7a7fc48c949d120cfc8e7fae618e45ffabc1d90d (diff) |
gant: fix gcc warning
src/gant/gant.c: In function ‘chevent’:
src/gant/gant.c:912:5: warning: ‘phase’ may be used uninitialized in this function [-Wmaybe-uninitialized]
switch (phase)
^
src/gant/gant.c:27:96: warning: ‘status’ may be used uninitialized in this function [-Wmaybe-uninitialized]
#define DEBUG_OUT(level, ...) {if (dbg && level <= dbg){fprintf(stderr, "DEBUG(%d): ", level); fprintf(stderr, __VA_ARGS__); fprintf(stderr, " in line %d.\n", __LINE__);}}
^
src/gant/gant.c:830:9: note: ‘status’ was declared here
uchar status;
^
-rw-r--r-- | src/gant/gant.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gant/gant.c b/src/gant/gant.c index c4e1b7c..287ffe0 100644 --- a/src/gant/gant.c +++ b/src/gant/gant.c @@ -827,8 +827,8 @@ void usage(void) uchar chevent(uchar chan, uchar event) { - uchar status; - uchar phase; + uchar status = 0; + uchar phase = 0; /*uint newdata;*/ struct ack_msg ack; struct auth_msg auth; |