[glib] silence some false-alarm uninitialised warnings



commit 5620f96305ee276ac758de989589a93de89ed40a
Author: Ryan Lortie <desrt desrt ca>
Date:   Sun Mar 21 14:17:21 2010 -0500

    silence some false-alarm uninitialised warnings

 glib/gvariant-parser.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/glib/gvariant-parser.c b/glib/gvariant-parser.c
index 362909a..45d2695 100644
--- a/glib/gvariant-parser.c
+++ b/glib/gvariant-parser.c
@@ -1550,6 +1550,10 @@ number_get_value (AST                 *ast,
           ast_set_error (ast, error, NULL, "number too big for any type");
           return NULL;
         }
+
+      /* silence uninitialised warnings... */
+      negative = FALSE;
+      abs_val = 0;
     }
   else
     {
@@ -1568,6 +1572,9 @@ number_get_value (AST                 *ast,
 
       if (abs_val == 0)
         negative = FALSE;
+
+      /* silence uninitialised warning... */
+      dbl_val = 0.0;
     }
 
   if (*end != '\0')



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]