ldlinux: Silence gcc warning about uninitialized variable
authorMatt Fleming <matt.fleming@intel.com>
Mon, 2 Apr 2012 13:12:06 +0000 (14:12 +0100)
committerMatt Fleming <matt.fleming@intel.com>
Tue, 17 Apr 2012 09:58:34 +0000 (10:58 +0100)
Initialize 'comm_counter' so that gcc will no longer complain with the
following,

cli.c: In function ‘edit_cmdline’:
cli.c:142:25: warning: ‘comm_counter’ may be used uninitialized in this function

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
com32/elflink/ldlinux/cli.c

index 6d74109..498644e 100644 (file)
@@ -139,7 +139,7 @@ const char *edit_cmdline(const char *input, int top /*, int width */ ,
     bool done = false;
     const char *ret;
     int width = 0;
-    struct cli_command *comm_counter;
+    struct cli_command *comm_counter = NULL;
 
     if (!width) {
        int height;