diff options
author | Jürg Billeter <j@bitron.ch> | 2008-11-14 18:13:48 +0000 |
---|---|---|
committer | Jürg Billeter <juergbi@src.gnome.org> | 2008-11-14 18:13:48 +0000 |
commit | 773507ce6043e1e05f7fccceaf01723b1dbe81de (patch) | |
tree | a606dc604ed4bd9814ba12c7feaee356e338efc7 /vala/valagenieparser.vala | |
parent | dd76fd18d25cfdaef8aa07b761f153fab6330f3b (diff) | |
download | vala-773507ce6043e1e05f7fccceaf01723b1dbe81de.tar.gz |
Do not use possibly uninitialized variables
2008-11-14 Jürg Billeter <j@bitron.ch>
* vala/valagenieparser.vala:
* vala/valainterface.vala:
* vala/valainterfacewriter.vala:
* vala/valaparser.vala:
* vala/valasemanticanalyzer.vala:
* gobject/valaccodeassignmentmodule.vala:
* gobject/valaccodebasemodule.vala:
* gobject/valaccodeinvocationexpressionmodule.vala:
* vapi/glib-2.0.vapi:
* vapigen/valagidlparser.vala:
* vapigen/valagirparser.vala:
* vapigen/valamarkupreader.vala:
* vapigen/valavapicheck.vala:
* gen-project/valaprojectgenerator.vala:
Do not use possibly uninitialized variables
svn path=/trunk/; revision=2017
Diffstat (limited to 'vala/valagenieparser.vala')
-rw-r--r-- | vala/valagenieparser.vala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vala/valagenieparser.vala b/vala/valagenieparser.vala index d004710af..436cb0980 100644 --- a/vala/valagenieparser.vala +++ b/vala/valagenieparser.vala @@ -886,7 +886,7 @@ public class Vala.Genie.Parser : CodeVisitor { Expression parse_array_creation_expression (SourceLocation begin, MemberAccess member) throws ParseError { bool size_specified = false; - Gee.List<Expression> size_specifier_list; + Gee.List<Expression> size_specifier_list = null; bool first = true; DataType element_type = UnresolvedType.new_from_expression (member); @@ -1482,7 +1482,7 @@ public class Vala.Genie.Parser : CodeVisitor { && current () != TokenType.WHEN && current () != TokenType.DEFAULT) { try { - Statement stmt; + Statement stmt = null; bool is_decl = false; comment = scanner.pop_comment (); switch (current ()) { @@ -2203,14 +2203,14 @@ public class Vala.Genie.Parser : CodeVisitor { } } catch (ParseError e) { int r; - while (true) { + do { r = recover (); if (r == RecoveryState.STATEMENT_BEGIN) { next (); } else { break; } - } + } while (true); if (r == RecoveryState.EOF) { return; } @@ -2792,7 +2792,7 @@ public class Vala.Genie.Parser : CodeVisitor { prop.get_accessor = new PropertyAccessor (true, false, false, block, get_src (accessor_begin)); prop.get_accessor.access = SymbolAccessibility.PUBLIC; } else { - bool _construct; + bool _construct = false; if (accept (TokenType.SET)) { if (readonly) { throw new ParseError.SYNTAX (get_error ("set block not allowed for a read only property")); |