Fix -Wshadow warnings
Fix warnings of this type:
CC event.lo
/home/simark/src/babeltrace/src/ctf-writer/event.c: In function ‘bt_ctf_event_common_create_fields’:
/home/simark/src/babeltrace/src/ctf-writer/event.c:135:21: error: declaration of ‘create_field_func’ shadows a global declaration [-Werror=shadow]
135 | create_field_func create_field_func,
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
In file included from /home/simark/src/babeltrace/src/ctf-writer/event.c:45:
/home/simark/src/babeltrace/src/ctf-writer/event.h:89:17: note: shadowed declaration is here
89 | typedef void *(*create_field_func)(void *);
| ^~~~~~~~~~~~~~~~~
Simply rename the types so they don't have the same name as the
parameters, suffix the types with `_type`.
I have added -Wno-shadow when building native_bt.c (in the Python
bindings), see the comment in Makefile.am for more details.
Change-Id: I5335d54f9a005d0cd4790f603ed3b1cda9645a93
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2271
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
This page took 0.026112 seconds and 4 git commands to generate.