Cleanup: fix cppcheck warnings
[babeltrace.git] / formats / ctf-text / types / enum.c
index 12031c242fef048c6de3687636fd211790456405..11529dd9bb9cf001dc87ecb460199f044bcc0bd8 100644 (file)
@@ -30,7 +30,7 @@ int ctf_text_enum_write(struct stream_pos *ppos, struct definition *definition)
                enum_definition->integer;
        struct ctf_text_stream_pos *pos = ctf_text_pos(ppos);
        GArray *qs;
-       int i, ret;
+       int ret;
        int field_nr_saved;
 
        if (!print_field(definition))
@@ -44,7 +44,7 @@ int ctf_text_enum_write(struct stream_pos *ppos, struct definition *definition)
        fprintf(pos->fp, " ");
        if (pos->print_names)
                fprintf(pos->fp, "%s = ",
-                       g_quark_to_string(definition->name));
+                       rem_(g_quark_to_string(definition->name)));
 
        field_nr_saved = pos->field_nr;
        pos->field_nr = 0;
@@ -53,6 +53,8 @@ int ctf_text_enum_write(struct stream_pos *ppos, struct definition *definition)
        qs = enum_definition->value;
 
        if (qs) {
+               int i;
+
                for (i = 0; i < qs->len; i++) {
                        GQuark q = g_array_index(qs, GQuark, i);
                        const char *str = g_quark_to_string(q);
This page took 0.027815 seconds and 4 git commands to generate.