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)
commitf3847c753f1b4f12353c38d97b0577d9993d19fb
treeb841e372210ebede81b42c824b969fdc0b1f4c92
parent0b07e9267102642fa28343cf45e2384406f5df7a
Fix -Wmissing-prototypes/-Wmissing-declarations warnings

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
38 files changed:
configure.ac
include/babeltrace2-ctf-writer/event.h
src/bindings/python/bt2/bt2/native_bt.i
src/bindings/python/bt2/bt2/native_bt_autodisc.i.h
src/bindings/python/bt2/bt2/native_bt_message_iterator.i.h
src/bindings/python/bt2/bt2/native_bt_plugin.i.h
src/cli/babeltrace2.c
src/ctf-writer/attributes.c
src/ctf-writer/event.c
src/ctf-writer/event.h
src/ctf-writer/field-types.h
src/ctf-writer/object.c
src/ctf-writer/stream.c
src/ctf-writer/trace.h
src/lib/error.c
src/lib/graph/iterator.c
src/lib/integer-range-set.c
src/lib/plugin/plugin.c
src/param-parse/param-parse.c
src/plugins/ctf/common/metadata/ctf-meta-resolve.c
src/plugins/ctf/common/metadata/decoder-packetized-file-stream-to-buf.c
src/plugins/ctf/common/metadata/lexer.l
src/plugins/ctf/common/metadata/objstack.c
src/plugins/ctf/common/metadata/parser.y
src/plugins/ctf/common/metadata/visitor-generate-ir.c
src/plugins/ctf/common/msg-iter/msg-iter.c
src/plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.c
src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.c
src/plugins/lttng-utils/debug-info/debug-info.c
src/plugins/lttng-utils/debug-info/trace-ir-metadata-field-class-copy.c
src/plugins/text/dmesg/dmesg.c
src/plugins/utils/counter/counter.c
src/plugins/utils/dummy/dummy.c
src/python-plugin-provider/python-plugin-provider.c
src/python-plugin-provider/python-plugin-provider.h
tests/bitfield/test_bitfield.c
tests/lib/test_bt_values.c
tests/utils/common.c
This page took 0.028658 seconds and 4 git commands to generate.