Fix -Wmissing-prototypes/-Wmissing-declarations warnings
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 28 Oct 2019 15:06:04 +0000 (11:06 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 30 Oct 2019 19:14:53 +0000 (15:14 -0400)
I think this warning is useful because it catches a lot of instances
where we missed including "foo.h" in "foo.c" or where we should make a
function static.

There are changes in this patch I am not sure about:

bt_ctf_event_borrow_stream: there doesn't seem to be any "borrow"
functions in the CTF writer API, only get (which return new references),
so I presume this is one is not meant to be exposed.  I made it static.

_bt_ctf_event_freeze: is not used anywhere, starts with an underscore,
so I presume it was meant to be internal, so I removed it.

bt_ctf_event_common_set_payload: it sounds like something that was meant
to be exposed internally, so I added a declaration to the internal
event.h.

bt_ctf_event_class_get_payload_type_*: they seem like functions that are
meant to be exposed in the external API, so I added declarations in the
external event.h.

bt_ctf_field_type_enumeration_mapping_iterator_next: it probably needs
to be exposed to make the functions which return a
bt_ctf_field_type_enumeration_mapping_iterator useful.

bt_ctf_field_type_enumeration_mapping_iterator_signed_get and
bt_ctf_field_type_enumeration_mapping_iterator_unsigned_get: same as
above.

bt_ctf_trace_visit: I guess it's meant to be exposed, so I added a
declaration in the internal trace.h.

bt_self_component_port_input_message_iterator_borrow_component_const: I
guess this should not exist, because hand out const versions of
bt_self_component_port_input_message_iterator?  I removed it.

bt_plugin_python_create_all_from_file: adding an include of
python-plugin-provider.h in python-plugin-provider.c revealed that the
declaration was way out of sync with the definition, I've tried to fix
that (and succeeded!).

Change-Id: I423d70645dbb1305f8993ec837131883bce47031
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2275


No differences found
This page took 0.027148 seconds and 4 git commands to generate.