[vala/0.40] codegen: Initialize delegate temp-var which is assigned by property getter
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.40] codegen: Initialize delegate temp-var which is assigned by property getter
- Date: Wed, 9 Oct 2019 17:35:16 +0000 (UTC)
commit 6e7ab3261f228903628454ddd7d76fb9c131ce08
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Wed Oct 2 18:19:53 2019 +0200
codegen: Initialize delegate temp-var which is assigned by property getter
Found by -Werror=maybe-uninitialized
codegen/valaccodememberaccessmodule.vala | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/codegen/valaccodememberaccessmodule.vala b/codegen/valaccodememberaccessmodule.vala
index 8dc6826dc..0ddffc962 100644
--- a/codegen/valaccodememberaccessmodule.vala
+++ b/codegen/valaccodememberaccessmodule.vala
@@ -254,7 +254,8 @@ public abstract class Vala.CCodeMemberAccessModule : CCodeControlFlowModule {
}
bool prop_is_real_non_null_struct_type =
prop.property_type.is_real_non_null_struct_type ();
- var temp_value = (GLibValue) create_temp_value (prop.get_accessor.value_type,
prop_is_real_non_null_struct_type, expr);
+ bool requires_init = prop.property_type is DelegateType ||
prop_is_real_non_null_struct_type;
+ var temp_value = (GLibValue) create_temp_value (prop.get_accessor.value_type,
requires_init, expr);
expr.target_value = load_temp_value (temp_value);
var ctemp = get_cvalue_ (temp_value);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]