debug-info: fix -Wenum-int-mismatch problem in copy_field_class_content_internal
authorSimon Marchi <simon.marchi@efficios.com>
Sat, 6 May 2023 02:59:47 +0000 (22:59 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 10 May 2023 16:10:33 +0000 (12:10 -0400)
commitf4e2bc6a8ab9f8c1557904d36151c691f726477c
tree98926ec2aee6edd2962443e1abf20cf62784d925
parent95766bd9d6f430a2da29f45a0338c631d43d006e
debug-info: fix -Wenum-int-mismatch problem in copy_field_class_content_internal

GCC 13 points out that the return value differs between the declaration
and definition of copy_field_class_content_internal, fix that.

      CC       trace-ir-metadata-field-class-copy.lo
    cc1: warning: command-line option '-Wsuggest-override' is valid for C++/ObjC++ but not for C
    /home/smarchi/src/babeltrace/src/plugins/lttng-utils/debug-info/trace-ir-metadata-field-class-copy.c:885:41: error: conflicting types for 'copy_field_class_content_internal' due to enum/integer mismatch; have 'enum debug_info_trace_ir_mapping_status(struct trace_ir_metadata_maps *, const bt_field_class *, bt_field_class *)' [-Werror=enum-int-mismatch]
      885 | enum debug_info_trace_ir_mapping_status copy_field_class_content_internal(
          |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from /home/smarchi/src/babeltrace/src/plugins/lttng-utils/debug-info/trace-ir-metadata-field-class-copy.c:22:
    /home/smarchi/src/babeltrace/src/plugins/lttng-utils/debug-info/trace-ir-metadata-field-class-copy.h:17:5: note: previous declaration of 'copy_field_class_content_internal' with type 'int(struct trace_ir_metadata_maps *, const bt_field_class *, bt_field_class *)'
       17 | int copy_field_class_content_internal(struct trace_ir_metadata_maps *trace_ir_metadata_maps,
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Change-Id: I9c0dd3ffc3ba1a2e9fbbca948a391357ae28a483
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/9986
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/plugins/lttng-utils/debug-info/trace-ir-metadata-field-class-copy.h
This page took 0.026467 seconds and 4 git commands to generate.