Commit ceefedb2 authored by Jürg Billeter's avatar Jürg Billeter
Browse files

GDBus: Initialize array length variable in property get wrappers

This fixes a gcc warning when building with -O3.

Based on patch by Marc-Antoine Perennou.

Fixes bug 686123.
parent 27240640
......@@ -505,7 +505,7 @@ public class Vala.GDBusServerModule : GDBusClientModule {
for (int dim = 1; dim <= array_type.rank; dim++) {
string length_cname = get_array_length_cname ("result", dim);
ccode.add_declaration ("int", new CCodeVariableDeclarator (length_cname));
ccode.add_declaration ("int", new (length_cname, new CCodeConstant ("0")));
ccall.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier (length_cname)));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment