[Pkg-running-devel] [antpm] 08/14: gant: fix gcc warning

Kristof Ralovich ralovich-guest at moszumanska.debian.org
Sat Oct 10 11:28:35 UTC 2015


This is an automated email from the git hooks/post-receive script.

ralovich-guest pushed a commit to branch master
in repository antpm.

commit 102ca98cc8315a34ede549a02378dbe6ccfe929e
Author: RALOVICH, Kristof <tade60 at freemail.hu>
Date:   Wed Oct 7 23:05:48 2015 +0200

    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;
             ^
---
 src/gant/gant.c | 4 ++--
 1 file 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;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-running/antpm.git



More information about the Pkg-running-devel mailing list