From: Mathieu Desnoyers Date: Tue, 24 May 2011 02:55:12 +0000 (-0400) Subject: Fix compile warning in semantic validator X-Git-Tag: v0.1~17 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=e4e9b4715098b1183895c8c09e97eff790a8cda7 Fix compile warning in semantic validator Signed-off-by: Mathieu Desnoyers --- diff --git a/formats/ctf/metadata/ctf-visitor-semantic-validator.c b/formats/ctf/metadata/ctf-visitor-semantic-validator.c index 0883bc79..5f72e0b4 100644 --- a/formats/ctf/metadata/ctf-visitor-semantic-validator.c +++ b/formats/ctf/metadata/ctf-visitor-semantic-validator.c @@ -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)