Initialize size to 0 to eliminate incorrect gcc uninitialized var warning
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 12 Aug 2011 14:42:24 +0000 (10:42 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 12 Aug 2011 14:42:24 +0000 (10:42 -0400)
gcc does not seem to keep track of both size and has_size.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/metadata/ctf-visitor-generate-io-struct.c

index ff5ae052abc0aa0f40ea7ade402d9c4dfa05ce81..6fbc7c02b0f74aeb41026a7bc0ed8391febaf2d6 100644 (file)
@@ -1093,7 +1093,7 @@ struct declaration *ctf_declaration_integer_visit(FILE *fd, int depth,
                struct ctf_trace *trace)
 {
        struct ctf_node *expression;
-       uint64_t alignment = 1, size;
+       uint64_t alignment = 1, size = 0;
        int byte_order = trace->byte_order;
        int signedness = 0;
        int has_alignment = 0, has_size = 0;
This page took 0.025365 seconds and 4 git commands to generate.