Fix compile warning in semantic validator
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 24 May 2011 02:55:12 +0000 (22:55 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 24 May 2011 02:55:12 +0000 (22:55 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/metadata/ctf-visitor-semantic-validator.c

index 0883bc79c1058036ad8dd64f17bbedc8d18f042a..5f72e0b42b1652c9a9929ceeb59b91733d282988 100644 (file)
@@ -301,18 +301,21 @@ int ctf_visitor_type_declarator(FILE *fd, int depth, struct ctf_node *node)
                 */
                if (node->u.type_declarator.type == TYPEDEC_NESTED)
                        goto errperm;
-               switch (node->u.type_declarator.type) {
-               case TYPESPEC_FLOATING_POINT:
-               case TYPESPEC_INTEGER:
-               case TYPESPEC_STRING:
-               case TYPESPEC_STRUCT:
-               case TYPESPEC_VARIANT:
-               case TYPESPEC_ENUM:
-                       if (cds_list_empty(&node->u.type_declarator.pointers))
-                               goto errperm;
-                       break;
-               default:
-                       break;
+               cds_list_for_each_entry(iter, &node->parent->u.typealias_alias.type_specifier_list->u.type_specifier_list.head,
+                                       siblings) {
+                       switch (iter->u.type_specifier.type) {
+                       case TYPESPEC_FLOATING_POINT:
+                       case TYPESPEC_INTEGER:
+                       case TYPESPEC_STRING:
+                       case TYPESPEC_STRUCT:
+                       case TYPESPEC_VARIANT:
+                       case TYPESPEC_ENUM:
+                               if (cds_list_empty(&node->u.type_declarator.pointers))
+                                       goto errperm;
+                               break;
+                       default:
+                               break;
+                       }
                }
                if (node->u.type_declarator.type == TYPEDEC_ID &&
                    node->u.type_declarator.u.id != NULL)
This page took 0.024485 seconds and 4 git commands to generate.