[vala] Fix use of uninitialized variable in static constructors



commit b8c69309ed9a425a814a9820c41379ef2a70b5da
Author: Jürg Billeter <j bitron ch>
Date:   Mon Oct 25 15:12:50 2010 +0200

    Fix use of uninitialized variable in static constructors
    
    Fixes bug 633013.

 codegen/valagobjectmodule.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valagobjectmodule.vala b/codegen/valagobjectmodule.vala
index 89c4834..ee94626 100644
--- a/codegen/valagobjectmodule.vala
+++ b/codegen/valagobjectmodule.vala
@@ -513,7 +513,7 @@ public class Vala.GObjectModule : GTypeModule {
 				/* always separate error parameter and inner_error local variable
 				 * as error may be set to NULL but we're always interested in inner errors
 				 */
-				ccode.add_declaration ("GError *", new CCodeVariableDeclarator ("_inner_error_", new CCodeConstant ("NULL")));
+				ccode.add_declaration ("GError *", new CCodeVariableDeclarator.zero ("_inner_error_", new CCodeConstant ("NULL")));
 			}
 
 			pop_context ();



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