[vala] codegen: Fix C warning when deserializing GVariant arrays
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] codegen: Fix C warning when deserializing GVariant arrays
- Date: Wed, 22 Dec 2010 08:06:50 +0000 (UTC)
commit 221589b94ad9ced56e53686eaf435d579ef5a845
Author: Jürg Billeter <j bitron ch>
Date: Wed Dec 22 08:42:51 2010 +0100
codegen: Fix C warning when deserializing GVariant arrays
codegen/valagvariantmodule.vala | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valagvariantmodule.vala b/codegen/valagvariantmodule.vala
index 87453a9..2b968aa 100644
--- a/codegen/valagvariantmodule.vala
+++ b/codegen/valagvariantmodule.vala
@@ -315,7 +315,7 @@ public class Vala.GVariantModule : GAsyncModule {
iter_call = new CCodeFunctionCall (new CCodeIdentifier ("g_variant_iter_next_value"));
iter_call.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier (subiter_name)));
- var cforcond = new CCodeAssignment (new CCodeIdentifier (element_name), iter_call);
+ var cforcond = new CCodeBinaryExpression (CCodeBinaryOperator.INEQUALITY, new CCodeAssignment (new CCodeIdentifier (element_name), iter_call), new CCodeConstant ("NULL"));
var cforiter = new CCodeUnaryExpression (CCodeUnaryOperator.POSTFIX_INCREMENT, new CCodeIdentifier ("%s_length%d".printf (temp_name, dim)));
ccode.open_for (null, cforcond, cforiter);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]