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

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

index b7a3f33648963eba9b5a600c96e946c3facdb29b..e5dcf8ba1ddc16f6131ec89584aeee6e22484214 100644 (file)
@@ -672,8 +672,6 @@ AX_COMPILER_FLAGS(
                -Wno-pointer-arith dnl
                -Wno-format-nonliteral dnl
                -Wno-undef dnl
-               -Wno-missing-prototypes dnl
-               -Wno-missing-declarations dnl
                -Wno-double-promotion dnl
                -Wno-cast-align dnl
        ])
index 98151253136cf158e2db5543fd78a78524b3eff2..6d2ae5476ce88decb00184ae10eccc23304e6964 100644 (file)
@@ -179,6 +179,18 @@ extern int bt_ctf_event_class_set_context_field_type(
 extern struct bt_ctf_field_type *bt_ctf_event_class_get_payload_field_type(
                struct bt_ctf_event_class *event_class);
 
+extern int64_t bt_ctf_event_class_get_payload_type_field_count(
+               struct bt_ctf_event_class *event_class);
+
+extern int bt_ctf_event_class_get_payload_type_field_by_index(
+               struct bt_ctf_event_class *event_class,
+               const char **field_name, struct bt_ctf_field_type **field_type,
+               uint64_t index);
+
+extern struct bt_ctf_field_type *
+bt_ctf_event_class_get_payload_type_field_type_by_name(
+               struct bt_ctf_event_class *event_class, const char *name);
+
 extern int bt_ctf_event_class_set_payload_field_type(
                struct bt_ctf_event_class *event_class,
                struct bt_ctf_field_type *payload_type);
index 4e48876848d30347539003364805141c17abac1a..919fc1dc8988bd9683605704bd4cd84eb0db7fd4 100644 (file)
@@ -243,3 +243,13 @@ void bt_bt2_exit_handler(void);
 %include "native_bt_trace_class.i"
 %include "native_bt_value.i"
 %include "native_bt_version.i"
+
+%{
+
+/*
+ * This function is defined by SWIG.  Declare here to avoid a
+ * -Wmissing-prototypes warning.
+ */
+PyObject *SWIG_init(void);
+
+%}
index aac92e129031fe77f2e26a01b583b5010e27506e..612c9328fd8c6a60a05a528e08a735d2318e0600 100644 (file)
@@ -47,6 +47,7 @@
  * This function can also return None, if it failed to allocate memory
  * for the return value and status code.
  */
+static
 bt_value *bt_bt2_auto_discover_source_components(const bt_value *inputs,
                const bt_plugin_set *plugin_set)
 {
index deb149cfafd1d132eb655e472aebb222da0d6f74..7802ee6d0830f5ac0379703a40f1c83b82bf7548 100644 (file)
@@ -22,6 +22,7 @@
  * THE SOFTWARE.
  */
 
+static
 bt_self_component_port_input_message_iterator_create_from_message_iterator_status
 bt_bt2_self_component_port_input_message_iterator_create_from_message_iterator(
                bt_self_message_iterator *self_msg_iter,
@@ -41,6 +42,7 @@ bt_bt2_self_component_port_input_message_iterator_create_from_message_iterator(
        return status;
 }
 
+static
 bt_self_component_port_input_message_iterator_create_from_sink_component_status
 bt_bt2_self_component_port_input_message_iterator_create_from_sink_component(
                bt_self_component_sink *self_comp,
index 7b15a213cf945875ea8c3cc56f0615e54e0ca3b9..166975b7c4586bb04d05b130a40ebd04ab17036e 100644 (file)
@@ -30,6 +30,7 @@
  * `*OUT`; it could point to unreadable memory.
  */
 
+static
 bt_property_availability bt_bt2_plugin_get_version(
                const bt_plugin *plugin, unsigned int *major,
                unsigned int *minor, unsigned int *patch, const char **extra)
@@ -45,6 +46,7 @@ bt_property_availability bt_bt2_plugin_get_version(
        return ret;
 }
 
+static
 bt_plugin_find_status bt_bt2_plugin_find(const char *plugin_name,
                bt_bool find_in_std_env_var, bt_bool find_in_user_dir,
                bt_bool find_in_sys_dir, bt_bool find_in_static,
@@ -62,6 +64,7 @@ bt_plugin_find_status bt_bt2_plugin_find(const char *plugin_name,
        return status;
 }
 
+static
 bt_plugin_find_all_status bt_bt2_plugin_find_all(bt_bool find_in_std_env_var,
                bt_bool find_in_user_dir, bt_bool find_in_sys_dir,
                bt_bool find_in_static, bt_bool fail_on_load_error,
@@ -79,6 +82,7 @@ bt_plugin_find_all_status bt_bt2_plugin_find_all(bt_bool find_in_std_env_var,
        return status;
 }
 
+static
 bt_plugin_find_all_from_file_status bt_bt2_plugin_find_all_from_file(
                const char *path, bt_bool fail_on_load_error,
                const bt_plugin_set **plugin_set)
@@ -94,6 +98,7 @@ bt_plugin_find_all_from_file_status bt_bt2_plugin_find_all_from_file(
        return status;
 }
 
+static
 bt_plugin_find_all_from_dir_status bt_bt2_plugin_find_all_from_dir(
                const char *path, bt_bool recurse, bt_bool fail_on_load_error,
                const bt_plugin_set **plugin_set)
index eaffebcdb5353e2cafd6cb7036ae789b05357d2a..c63a16c77258990a41de6b7b023c36e56f51f17a 100644 (file)
@@ -811,6 +811,7 @@ typedef void *(* plugin_borrow_comp_cls_by_index_func_t)(const bt_plugin *,
 typedef const bt_component_class *(* spec_comp_cls_borrow_comp_cls_func_t)(
        void *);
 
+static
 void cmd_list_plugins_print_component_classes(const bt_plugin *plugin,
                const char *cc_type_name, uint64_t count,
                plugin_borrow_comp_cls_by_index_func_t borrow_comp_cls_by_index_func,
index 3665d1fcda8026abf4fcc798788d3cf82bd5490c..5d17f7a9f60523e011414f39976a6893074d6764 100644 (file)
@@ -28,6 +28,8 @@
 #define BT_LOG_TAG "CTF-WRITER/ATTRS"
 #include "logging.h"
 
+#include "attributes.h"
+
 #include "common/assert.h"
 #include "common/macros.h"
 #include "compat/string.h"
index 5c483ed4164630de0871f56e43d480c023e38411..158aa2082db257cb937a2dead4acf1fa3100b91f 100644 (file)
@@ -518,6 +518,7 @@ end:
        return ret;
 }
 
+static
 int map_clock_classes_func(struct bt_ctf_stream_class_common *stream_class,
                struct bt_ctf_field_type_common *packet_context_type,
                struct bt_ctf_field_type_common *event_header_type)
@@ -645,7 +646,7 @@ struct bt_ctf_event_class *bt_ctf_event_get_class(struct bt_ctf_event *event)
        return bt_ctf_object_get_ref(bt_ctf_event_common_borrow_class(BT_CTF_TO_COMMON(event)));
 }
 
-BT_HIDDEN
+static
 struct bt_ctf_stream *bt_ctf_event_borrow_stream(struct bt_ctf_event *event)
 {
        BT_ASSERT_DBG(event);
@@ -756,12 +757,6 @@ end:
        return ret;
 }
 
-BT_HIDDEN
-void _bt_ctf_event_freeze(struct bt_ctf_event *event)
-{
-       _bt_ctf_event_common_set_is_frozen(BT_CTF_TO_COMMON(event), true);
-}
-
 int bt_ctf_event_set_header(struct bt_ctf_event *event,
                struct bt_ctf_field *header)
 {
index a51b9011f5e6614bc091da2586a3b2acfe0854b2..968abff729f33a8344eed222122b996d5a47c1bd 100644 (file)
@@ -106,6 +106,10 @@ int bt_ctf_event_common_initialize(struct bt_ctf_event_common *event,
                create_header_field_func_type create_header_field_func,
                release_header_field_func_type release_header_field_func);
 
+BT_HIDDEN
+int bt_ctf_event_common_set_payload(struct bt_ctf_event *event,
+               struct bt_ctf_field *payload);
+
 static inline
 struct bt_ctf_field_common *bt_ctf_event_common_borrow_payload(
                struct bt_ctf_event_common *event)
index ce4dafe65afc2309f28cef3235bd022391307843..7fe846382e999dc60364129b40f34d966bdc82c9 100644 (file)
@@ -449,6 +449,22 @@ struct bt_ctf_field_type_enumeration_mapping_iterator *
 bt_ctf_field_type_common_enumeration_unsigned_find_mappings_by_value(
                struct bt_ctf_field_type_common *ft, uint64_t value);
 
+BT_HIDDEN
+int bt_ctf_field_type_enumeration_mapping_iterator_next(
+               struct bt_ctf_field_type_enumeration_mapping_iterator *iter);
+
+BT_HIDDEN
+int bt_ctf_field_type_enumeration_mapping_iterator_signed_get(
+               struct bt_ctf_field_type_enumeration_mapping_iterator *iter,
+               const char **mapping_name, int64_t *range_begin,
+               int64_t *range_end);
+
+BT_HIDDEN
+int bt_ctf_field_type_enumeration_mapping_iterator_unsigned_get(
+               struct bt_ctf_field_type_enumeration_mapping_iterator *iter,
+               const char **mapping_name, uint64_t *range_begin,
+               uint64_t *range_end);
+
 BT_HIDDEN
 int bt_ctf_field_type_common_enumeration_signed_get_mapping_by_index(
                struct bt_ctf_field_type_common *ft, uint64_t index,
index db7990825693294ddaaa4fe8add83797fe22515e..12111f74379a3f13d5c54adbcb80062cfd68f86d 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #include "object.h"
+#include <babeltrace2-ctf-writer/object.h>
 
 void *bt_ctf_object_get_ref(void *obj)
 {
index 247d64a6590c0d175a34196b04ed6d7506513fc4..cb882247609c5d7aab3653da759a11da027efb6e 100644 (file)
@@ -668,6 +668,7 @@ end:
        return ret;
 }
 
+static
 int visit_event_update_clock_value(struct bt_ctf_event *event, uint64_t *val)
 {
        int ret = 0;
index 63c60798b552118ddb09d91b379b7382d367b5ca..6e70f72061fe8f50388b9cd76b68c916d8676379 100644 (file)
@@ -388,4 +388,8 @@ struct bt_ctf_value *
 bt_ctf_trace_get_environment_field_value_by_name(
                struct bt_ctf_trace *trace, const char *name);
 
+BT_HIDDEN
+int bt_ctf_trace_visit(struct bt_ctf_trace *trace,
+               bt_ctf_visitor visitor, void *data);
+
 #endif /* BABELTRACE_CTF_WRITER_TRACE_INTERNAL_H */
index 3ae2db988865b5416abcaabaeb648bed81d95528..7cdf95bc6a6240e46a91ac20e6c69e3167de8587 100644 (file)
@@ -363,6 +363,7 @@ end:
        return cause;
 }
 
+static
 struct bt_error_cause_message_iterator_actor *
 create_error_cause_message_iterator_actor(struct bt_message_iterator *iter,
                const char *file_name, uint64_t line_no)
index 8d0f156dea4c2a282c9ca430101f0cd03f8ef481..d70514bdb2ad3ab3e2fd3b398cd2bdc750cf65e0 100644 (file)
@@ -950,14 +950,6 @@ bt_self_component_port_input_message_iterator_borrow_component(
        return iterator->upstream_component;
 }
 
-const struct bt_component *
-bt_self_component_port_input_message_iterator_borrow_component_const(
-               const struct bt_self_component_port_input_message_iterator *iterator)
-{
-       BT_ASSERT_PRE_DEV_NON_NULL(iterator, "Message iterator");
-       return iterator->upstream_component;
-}
-
 struct bt_self_component *bt_self_message_iterator_borrow_component(
                struct bt_self_message_iterator *self_iterator)
 {
index d919cf727960b9b3663a35f93e5ff1f873af3300..5175fe244d6bd9775dc5b7cabfe51ec056b82d11 100644 (file)
@@ -185,6 +185,7 @@ struct bt_integer_range_set_signed *bt_integer_range_set_signed_create(void)
        return (void *) create_range_set();
 }
 
+static
 void add_range_to_range_set(struct bt_integer_range_set *range_set,
                uint64_t u_lower, uint64_t u_upper)
 {
index aec5ed6837cb94378b173ad7c5a02245189b55d6..24b3aef9bbcc44a89bb301fec3c2bc5146c929d4 100644 (file)
 
 #define APPEND_ALL_FROM_DIR_NFDOPEN_MAX        8
 
+/* Declare here to make sure definition in both ifdef branches are in sync. */
+static
+int init_python_plugin_provider(void);
+typedef int (*create_all_from_file_sym_type)(
+               const char *path,
+               bool fail_on_load_error,
+               struct bt_plugin_set **plugin_set_out);
+
 #ifdef BT_BUILT_IN_PYTHON_PLUGIN_SUPPORT
 #include <plugin/python-plugin-provider.h>
 
 static
-int (*bt_plugin_python_create_all_from_file_sym)(
-               const char *path, bool fail_on_load_error,
-               struct bt_plugin_set **plugin_set_out) =
-       bt_plugin_python_create_all_from_file;
+create_all_from_file_sym_type
+       bt_plugin_python_create_all_from_file_sym =
+                       bt_plugin_python_create_all_from_file;
 
 static
-enum bt_plugin_status init_python_plugin_provider(void)
+int init_python_plugin_provider(void)
 {
 }
 #else /* BT_BUILT_IN_PYTHON_PLUGIN_SUPPORT */
 static GModule *python_plugin_provider_module;
 
 static
-int (*bt_plugin_python_create_all_from_file_sym)(
-               const char *path, bool fail_on_load_error,
-                struct bt_plugin_set **plugin_set_out);
+create_all_from_file_sym_type bt_plugin_python_create_all_from_file_sym;
 
 static
 int init_python_plugin_provider(void) {
index e7e98b342b0bb12d974ed5151178bd0c6052de97..c2e0ec59349ce5106838dc28d646ed21656d72fc 100644 (file)
@@ -20,6 +20,8 @@
  * SOFTWARE.
  */
 
+#include "param-parse.h"
+
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
index 42c84df110d9fd7342a815872b129572fcdbfb08..1dcb51fe76a59ab51eb5912fb252bd5e274a70db 100644 (file)
@@ -759,6 +759,7 @@ void get_ctx_stack_field_path(struct resolve_context *ctx,
  * Returns the index of the lowest common ancestor of two field path
  * objects having the same root scope.
  */
+static
 int64_t get_field_paths_lca_index(struct ctf_field_path *field_path1,
                struct ctf_field_path *field_path2,
                struct resolve_context *ctx)
index a2f197af7f9ad4320fee592279984f51d297f4fb..81dcf22456d04adfcfb012338cdfeb79a71aebb3 100644 (file)
@@ -17,6 +17,8 @@
 #define BT_LOG_TAG "PLUGIN/CTF/META/DECODER-DECODE-PACKET"
 #include "logging/comp-logging.h"
 
+#include "decoder-packetized-file-stream-to-buf.h"
+
 #include <stdio.h>
 #include <stdbool.h>
 #include <stdint.h>
index 55a42d6191185d205307b072afd0e28979f2be41..2dd456216a57044ad38f8bfeee0f3387519cddbb 100644 (file)
                        return CTF_ERROR;                               \
                }                                                       \
        } while (0)
-
-BT_HIDDEN
-void setstring(struct ctf_scanner *scanner, YYSTYPE *lvalp, const char *src);
-
-BT_HIDDEN
-int import_string(struct ctf_scanner *scanner, YYSTYPE *lvalp, const char *src, char delim);
-
 %}
 
 %x comment_ml comment_sl string_lit char_const
index febb9f287308697fb2f475dcb35a50dbe320aa03..5919fa13f481088c25760ba4986f245d7c3449b7 100644 (file)
@@ -28,6 +28,8 @@
 #define BT_LOG_TAG "PLUGIN/CTF/META/OBJSTACK"
 #include "logging.h"
 
+#include "objstack.h"
+
 #include <stdlib.h>
 #include "common/list.h"
 #include "common/macros.h"
index 54d28b6fef67b811f8a88d6a1da377782a0fd15e..f75e577b42b18559afd01f96b6b917a8c5731ecf 100644 (file)
@@ -937,19 +937,13 @@ static int set_parent_node(struct ctf_node *node,
        return 0;
 }
 
-BT_HIDDEN
+static
 void yyerror(struct ctf_scanner *scanner, yyscan_t yyscanner, const char *str)
 {
        _BT_LOGE_LINENO(yyget_lineno(scanner->scanner),
                "%s: token=\"%s\"", str, yyget_text(scanner->scanner));
 }
 
-BT_HIDDEN
-int yywrap(void)
-{
-       return 1;
-}
-
 #define reparent_error(scanner, str)                           \
 do {                                                           \
        yyerror(scanner, scanner->scanner, YY_("reparent_error: " str)); \
@@ -1057,6 +1051,13 @@ void ctf_scanner_free(struct ctf_scanner *scanner)
 #endif
 }
 
+%code provides {
+       BT_HIDDEN
+       void setstring(struct ctf_scanner *scanner, YYSTYPE *lvalp, const char *src);
+       
+       BT_HIDDEN
+       int import_string(struct ctf_scanner *scanner, YYSTYPE *lvalp, const char *src, char delim);
+}
 
 %define api.pure
        /* %locations */
index 11cb3c3d21045572a6a9d20372b2c31d9db0b426..abac12ae9d7b58e32f3e5bf5565eb2fa68b4a356 100644 (file)
@@ -868,6 +868,7 @@ end:
        return ret;
 }
 
+static
 int get_unary_uuid(struct ctx *ctx, struct bt_list_head *head,
                bt_uuid_t uuid)
 {
index 30552ae0bdd2070b691bf411cc9797aa30c71cf2..b536a113280aa1dfa058f4cd311d0ef972d83a39 100644 (file)
@@ -2216,6 +2216,7 @@ end:
        return BT_BFCR_STATUS_OK;
 }
 
+static
 enum bt_bfcr_status bfcr_compound_begin_cb(
                struct ctf_field_class *fc, void *data)
 {
@@ -2267,6 +2268,7 @@ end:
        return BT_BFCR_STATUS_OK;
 }
 
+static
 enum bt_bfcr_status bfcr_compound_end_cb(
                struct ctf_field_class *fc, void *data)
 {
index 73b9f34b82cea32a297be77e598f17247fc0e154..d7a9b8483930c6150b0f7ae615a269cedbb16b42 100644 (file)
@@ -20,6 +20,8 @@
  * SOFTWARE.
  */
 
+#include "translate-ctf-ir-to-tsdl.h"
+
 #include <babeltrace2/babeltrace.h>
 #include "common/macros.h"
 #include <stdio.h>
index 6d32cb193e19c11742e8be61be688f149d8467ed..d1e969f8db0eda36956208b373026b9cdcc40744 100644 (file)
@@ -25,6 +25,8 @@
 #define BT_LOG_TAG "PLUGIN/SINK.CTF.FS/TRANSLATE-TRACE-IR-TO-CTF-IR"
 #include "logging/comp-logging.h"
 
+#include "translate-trace-ir-to-ctf-ir.h"
+
 #include <babeltrace2/babeltrace.h>
 #include "common/macros.h"
 #include "common/common.h"
@@ -1692,6 +1694,7 @@ end:
        return ret;
 }
 
+static
 bool default_clock_class_name_exists(struct fs_sink_ctf_trace *trace,
                const char *name)
 {
index 7a57704201b9017062497d525818c16e8decdeed..0caebd1d22c366baf3d7c3d6519a394f54b98d16 100644 (file)
@@ -856,6 +856,7 @@ end:
        return;
 }
 
+static
 void trace_debug_info_remove_func(const bt_trace *in_trace, void *data)
 {
        struct debug_info_msg_iter *debug_it = data;
index 31c9f71aca91a7298dcced72b837bbee35e9d26e..73f3515c1cea732c8b52047586942308de1226ec 100644 (file)
@@ -214,7 +214,7 @@ enum debug_info_trace_ir_mapping_status field_class_signed_integer_copy(
        return DEBUG_INFO_TRACE_IR_MAPPING_STATUS_OK;
 }
 
-BT_HIDDEN
+static
 enum debug_info_trace_ir_mapping_status field_class_unsigned_enumeration_copy(
                struct trace_ir_metadata_maps *md_maps,
                const bt_field_class *in_field_class,
index 6031c9aea28d39b775350049f6673292e08e3225..02666ada9adade5ea672068cfce6cd9f8e711b71 100644 (file)
@@ -26,6 +26,8 @@
 #define BT_LOG_TAG "PLUGIN/SRC.TEXT.DMESG"
 #include "logging/comp-logging.h"
 
+#include "dmesg.h"
+
 #include <stdbool.h>
 #include <string.h>
 #include <ctype.h>
index 18ec60559eaae09285ad058dac44890f45b3cde4..d9b7baeeb0ec13ceb6ee523e2d52c8ad9db7c5b8 100644 (file)
@@ -113,6 +113,7 @@ void try_print_last(struct counter *counter)
        }
 }
 
+static
 void destroy_private_counter_data(struct counter *counter)
 {
        if (counter) {
index f9718808d751ee64eba2b8fcedab8a756176c461..6f772561c5674660621293ef9acb3598b56e001c 100644 (file)
@@ -34,6 +34,7 @@
 static
 const char * const in_port_name = "in";
 
+static
 void destroy_private_dummy_data(struct dummy *dummy)
 {
        bt_self_component_port_input_message_iterator_put_ref(dummy->msg_iter);
index 5bb4e33b729085ea080d887750ca817fafd54da3..d1bc73a166e05a2cadd60fcbe61950e1c6b93ece 100644 (file)
  */
 
 #define BT_LOG_TAG "LIB/PLUGIN-PY"
-
 #include "lib/logging.h"
+
+#include "python-plugin-provider.h"
+
 #include "common/macros.h"
 #include "compat/compiler.h"
 #include <babeltrace2/plugin/plugin-const.h>
index a8848c743c7ae5db0279e24d2bb3f159345bbc12..3deb16f9507c39631bae4c812ece673cb22ac67d 100644 (file)
  * SOFTWARE.
  */
 
-#include <babeltrace2/plugin/plugin-const.h>
+#include <babeltrace2/babeltrace.h>
+#include <stdbool.h>
 
 extern
-enum bt_plugin_status bt_plugin_python_create_all_from_file(const char *path,
+int bt_plugin_python_create_all_from_file(const char *path,
+               bool fail_on_load_error,
                struct bt_plugin_set **plugin_set_out);
 
 #endif /* BABELTRACE_PLUGIN_PYTHON_PLUGIN_PROVIDER_INTERNAL_H */
index 558e34196b668c5c0997ae513b66e9a7a99208a3..b8e7bcb49eebfa4a5be4f520f838440858ade7cb 100644 (file)
@@ -30,8 +30,9 @@ unsigned int glob;
 
 /*
  * This function is only declared to show the size of a bitfield write in
- * objdump.
+ * objdump.  The declaration is there to avoid a -Wmissing-prototypes warning.
  */
+void fct(void);
 void fct(void)
 {
        bt_bitfield_write(&glob, unsigned int, 12, 15, 0x12345678);
@@ -148,6 +149,7 @@ do {                                        \
        (val) != (ref);                                                         \
 })
 
+static
 void run_test_unsigned_write(unsigned int src_ui, unsigned long long src_ull)
 {
        unsigned int nrbits_ui, nrbits_ull;
@@ -270,6 +272,7 @@ void run_test_unsigned_write(unsigned int src_ui, unsigned long long src_ull)
        pass(UNSIGNED_LONG_LONG_WRITE_TEST_DESC_FMT_STR, src_ull);
 }
 
+static
 void run_test_unsigned_read(unsigned int src_ui, unsigned long long src_ull)
 {
        unsigned int nrbits_ui, nrbits_ull, readval_ui;
@@ -392,12 +395,14 @@ void run_test_unsigned_read(unsigned int src_ui, unsigned long long src_ull)
        pass(UNSIGNED_LONG_LONG_READ_TEST_DESC_FMT_STR, src_ull);
 }
 
+static
 void run_test_unsigned(unsigned int src_ui, unsigned long long src_ull)
 {
        run_test_unsigned_write(src_ui, src_ull);
        run_test_unsigned_read(src_ui, src_ull);
 }
 
+static
 void run_test_signed_write(int src_i, long long src_ll)
 {
        unsigned int nrbits_i, nrbits_ll;
@@ -528,6 +533,7 @@ void run_test_signed_write(int src_i, long long src_ll)
        pass(SIGNED_LONG_LONG_WRITE_TEST_DESC_FMT_STR, src_ll);
 }
 
+static
 void run_test_signed_read(int src_i, long long src_ll)
 {
        unsigned int nrbits_i, nrbits_ll;
@@ -659,12 +665,14 @@ void run_test_signed_read(int src_i, long long src_ll)
        pass(SIGNED_LONG_LONG_READ_TEST_DESC_FMT_STR, src_ll);
 }
 
+static
 void run_test_signed(int src_i, long long src_ll)
 {
        run_test_signed_write(src_i, src_ll);
        run_test_signed_read(src_i, src_ll);
 }
 
+static
 void run_test(void)
 {
        int i;
index 4f9423eaf12eb834633f784b29048eeaa5531f2f..c0a9f5a7c6c268c0f127100c5db43b4bbb528df6 100644 (file)
@@ -794,6 +794,7 @@ void test_is_equal_unsigned_integer(void)
        BT_VALUE_PUT_REF_AND_RESET(int3);
 }
 
+static
 void test_is_equal_signed_integer(void)
 {
        bt_value *int1 =
index 1878d777d3eba4b78f43523a4dcc8f48fd8719a0..dbc63d97f47d00311491724d8bc443f8f4ca9bbb 100644 (file)
@@ -19,6 +19,8 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
+#include "common.h"
+
 #include <unistd.h>
 #include <stdio.h>
 #include <dirent.h>
This page took 0.040157 seconds and 4 git commands to generate.