Update integer encoding
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 21 May 2011 22:02:24 +0000 (18:02 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 21 May 2011 22:02:24 +0000 (18:02 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/metadata/ctf-visitor-generate-io-struct.c

index 09ce18471031be1a063307e70f30571be24fe1c6..b62f33d7354f5649ac01c695cd71d2c64fc737e8 100644 (file)
@@ -350,6 +350,11 @@ struct declaration *ctf_type_declarator_visit(FILE *fd, int depth,
 
                /* TYPEDEC_NESTED */
 
+               if (!nested_declaration) {
+                       fprintf(fd, "[error] %s: nested type is unknown.\n", __func__);
+                       return NULL;
+               }
+
                /* create array/sequence, pass nested_declaration as child. */
                if (cds_list_empty(&node_type_declarator->u.type_declarator.u.nested.length)) {
                        fprintf(fd, "[error] %s: expecting length field reference or value.\n", __func__);
@@ -1187,6 +1192,8 @@ struct declaration *ctf_declaration_integer_visit(FILE *fd, int depth,
                        else if (!strcmp(s_right, "ASCII")
                            || !strcmp(s_right, "ascii"))
                                encoding = CTF_STRING_ASCII;
+                       else if (!strcmp(s_right, "none"))
+                               encoding = CTF_STRING_NONE;
                        else {
                                fprintf(fd, "[error] %s: unknown string encoding \"%s\"\n", __func__, s_right);
                                g_free(s_right);
This page took 0.025427 seconds and 4 git commands to generate.