[vala/staging] codegen: Don't implicitly initialize local variables with an initializer
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] codegen: Don't implicitly initialize local variables with an initializer
- Date: Thu, 10 Nov 2016 10:54:33 +0000 (UTC)
commit 74109a2eb1cbe68d32f14f4b426163c9b9a742dc
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Thu Nov 10 11:52:16 2016 +0100
codegen: Don't implicitly initialize local variables with an initializer
codegen/valaccodebasemodule.vala | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index a95023c..66b8105 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -2358,7 +2358,8 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
// try to initialize uninitialized variables
// initialization not necessary for variables stored in closure
- cvar.initializer = default_value_for_type (local.variable_type, true);
+ if (local.initializer == null)
+ cvar.initializer = default_value_for_type (local.variable_type, true);
cvar.init0 = true;
ccode.add_declaration (get_ccode_name (local.variable_type), cvar);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]