Fix: Suppress a compiler warning (always-false condition)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 2 lines · * Jérémie Galarneau ([email protected]) wrote:
Clang reports an always-false condition (checking if an unsigned value < 0) caused by a type mismatch in
ctf-visitor-generate-io-struct.c.
manually split into 2 commits (cleanups is a separate commit).
merged,
Thanks,
Mathieu
Quoted 75 lines
Remove trailing whitespaces.
Signed-off-by Jérémie Galarneau <[email protected]>--- formats/ctf/metadata/ctf-visitor-generate-io-struct.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)formats/ctf/metadata/ctf-visitor-generate-io-struct.c +5
-8@@ -649,7 +649,7 @@ int ctf_typedef_visit(FILE *fd, int depth, struct declaration_scope *scope,bt_list_for_each_entry (iter, type_declarators, siblings) {struct bt_declaration *type_declaration;int ret; - + type_declaration = ctf_type_declarator_visit(fd, depth, type_specifier_list, &identifier, iter,@@ -865,7 +865,6 @@ struct bt_declaration *ctf_declaration_struct_visit(FILE *fd,if (name) {if (bt_lookup_struct_declaration (g_quark_from_string (name), declaration_scope)) { -fprintf (fd,"[error] %s: struct %s already declared in scope\n" , __func__, name);return NULL ; }@@ -936,7 +935,6 @@ struct bt_declaration *ctf_declaration_variant_visit(FILE *fd,if (name) {if (bt_lookup_variant_declaration (g_quark_from_string (name), declaration_scope)) { -fprintf (fd,"[error] %s: variant %s already declared in scope\n" , __func__, name);return NULL ; }@@ -1105,7 +1103,6 @@ struct bt_declaration *ctf_declaration_enum_visit(FILE *fd, int depth,if (name) {if (bt_lookup_enum_declaration (g_quark_from_string (name), declaration_scope)) { -fprintf (fd,"[error] %s: enum %s already declared in scope\n" , __func__, name);return NULL ; }@@ -1233,7 +1230,7 @@ int get_boolean(FILE *fd, int depth, struct ctf_node *unary_expression)fprintf (fd,"[error] %s: unexpected unary expression type\n" , __func__);return -EINVAL ; - } + } }@@ -1479,9 +1476,9 @@ struct bt_declaration *ctf_declaration_floating_point_visit(FILE *fd, int depth, struct ctf_trace *trace) {struct ctf_node *expression; -uint64_t alignment =1 , exp_dig =0 , mant_dig =0 , - byte_order = trace->byte_order; -int has_alignment =0 , has_exp_dig =0 , has_mant_dig =0 ; +uint64_t alignment =1 , exp_dig =0 , mant_dig =0 ; +int byte_order = trace->byte_order, has_alignment =0 , + has_exp_dig =0 , has_mant_dig =0 ;struct declaration_float *float_declaration;bt_list_for_each_entry (expression, expressions, siblings) {Signature · 7 lines
1.8.2.2 _______________________________________________ lttng-dev mailing list [email protected] http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Signature · 3 lines
Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com