From: Michael Jeanson Date: Wed, 24 Mar 2021 20:12:34 +0000 (-0400) Subject: fix: all functions have declarations (-Wmissing-prototypes -Wold-style-definition) X-Git-Tag: v2.13.0-rc1~161 X-Git-Url: http://git.liburcu.org/?p=lttng-ust.git;a=commitdiff_plain;h=4b4a133740c87d9a851023a7aeb06b78d887e51b fix: all functions have declarations (-Wmissing-prototypes -Wold-style-definition) Make sure that all non-static functions have a declaration. Change-Id: I4057795631c53c4281127457a1ee5a538ee7fcce Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/doc/examples/clock-override/lttng-ust-clock-override-example.c b/doc/examples/clock-override/lttng-ust-clock-override-example.c index b1c3c3c4..7b8201b2 100644 --- a/doc/examples/clock-override/lttng-ust-clock-override-example.c +++ b/doc/examples/clock-override/lttng-ust-clock-override-example.c @@ -80,6 +80,10 @@ const char *plugin_description(void) return "Coarse monotonic clock at 1KHz"; } +/* + * Entry-point called by liblttng-ust through dlsym(); + */ +void lttng_ust_clock_plugin_init(void); void lttng_ust_clock_plugin_init(void) { int ret; diff --git a/doc/examples/getcpu-override/lttng-ust-getcpu-override-example.c b/doc/examples/getcpu-override/lttng-ust-getcpu-override-example.c index 084079c0..58f79997 100644 --- a/doc/examples/getcpu-override/lttng-ust-getcpu-override-example.c +++ b/doc/examples/getcpu-override/lttng-ust-getcpu-override-example.c @@ -17,6 +17,10 @@ int plugin_getcpu(void) return 0; } +/* + * Entry-point called by liblttng-ust through dlsym(); + */ +void lttng_ust_getcpu_plugin_init(void); void lttng_ust_getcpu_plugin_init(void) { int ret; diff --git a/doc/examples/hello-static-lib/hello.c b/doc/examples/hello-static-lib/hello.c index e7133c5d..e54b1e1b 100644 --- a/doc/examples/hello-static-lib/hello.c +++ b/doc/examples/hello-static-lib/hello.c @@ -20,12 +20,14 @@ #define TRACEPOINT_DEFINE #include "ust_tests_hello.h" +static void inthandler(int sig) { printf("in SIGUSR1 handler\n"); tracepoint(ust_tests_hello, tptest_sighandler); } +static int init_int_handler(void) { int result; diff --git a/liblttng-ust-comm/lttng-ust-fd-tracker.c b/liblttng-ust-comm/lttng-ust-fd-tracker.c index c9b5fdc0..18456e08 100644 --- a/liblttng-ust-comm/lttng-ust-fd-tracker.c +++ b/liblttng-ust-comm/lttng-ust-fd-tracker.c @@ -31,6 +31,7 @@ #include #include "../liblttng-ust/compat.h" +#include "../liblttng-ust/lttng-tracer-core.h" /* Operations on the fd set. */ #define IS_FD_VALID(fd) ((fd) >= 0 && (fd) < lttng_ust_max_fd) diff --git a/liblttng-ust-libc-wrapper/lttng-ust-malloc.c b/liblttng-ust-libc-wrapper/lttng-ust-malloc.c index f8c7aa8b..d407985f 100644 --- a/liblttng-ust-libc-wrapper/lttng-ust-malloc.c +++ b/liblttng-ust-libc-wrapper/lttng-ust-malloc.c @@ -14,11 +14,16 @@ #include #include #include +#include + #include #include #include #include #include + +#include + #include #include "ust-compat.h" diff --git a/liblttng-ust-python-agent/lttng_ust_python.c b/liblttng-ust-python-agent/lttng_ust_python.c index 9be0cf79..f2efb4ea 100644 --- a/liblttng-ust-python-agent/lttng_ust_python.c +++ b/liblttng-ust-python-agent/lttng_ust_python.c @@ -13,6 +13,9 @@ * The tracepoint fired by the agent. */ +void py_tracepoint(const char *asctime, const char *msg, + const char *logger_name, const char *funcName, unsigned int lineno, + unsigned int int_loglevel, unsigned int thread, const char *threadName); void py_tracepoint(const char *asctime, const char *msg, const char *logger_name, const char *funcName, unsigned int lineno, unsigned int int_loglevel, unsigned int thread, const char *threadName) diff --git a/liblttng-ust/event-notifier-notification.c b/liblttng-ust/event-notifier-notification.c index 42223326..b9b0a7c6 100644 --- a/liblttng-ust/event-notifier-notification.c +++ b/liblttng-ust/event-notifier-notification.c @@ -14,6 +14,7 @@ #include #include +#include "lttng-tracer-core.h" #include "ust-events-internal.h" #include "../libmsgpack/msgpack.h" #include "lttng-bytecode.h" diff --git a/liblttng-ust/lttng-bytecode.c b/liblttng-ust/lttng-bytecode.c index d4161fc3..67fb1a06 100644 --- a/liblttng-ust/lttng-bytecode.c +++ b/liblttng-ust/lttng-bytecode.c @@ -577,16 +577,6 @@ void lttng_enabler_link_bytecode(struct lttng_ust_event_desc *event_desc, } } -/* - * We own the bytecode if we return success. - */ -int lttng_filter_enabler_attach_bytecode(struct lttng_enabler *enabler, - struct lttng_ust_bytecode_node *bytecode) -{ - cds_list_add(&bytecode->node, &enabler->filter_bytecode_head); - return 0; -} - static void free_filter_runtime(struct cds_list_head *bytecode_runtime_head) { diff --git a/liblttng-ust/lttng-context-procname.c b/liblttng-ust/lttng-context-procname.c index 2e2c7fa2..a65585de 100644 --- a/liblttng-ust/lttng-context-procname.c +++ b/liblttng-ust/lttng-context-procname.c @@ -14,6 +14,7 @@ #include #include #include "compat.h" +#include "lttng-tracer-core.h" #include "context-internal.h" diff --git a/liblttng-ust/lttng-events.c b/liblttng-ust/lttng-events.c index e92d0574..d411dcf1 100644 --- a/liblttng-ust/lttng-events.c +++ b/liblttng-ust/lttng-events.c @@ -58,6 +58,7 @@ #include "../libcounter/counter.h" #include "jhash.h" #include +#include "context-provider-internal.h" /* * All operations within this file are called by the communication diff --git a/liblttng-ust/lttng-ring-buffer-client-discard-rt.c b/liblttng-ust/lttng-ring-buffer-client-discard-rt.c index 0c5884b7..c76ce9df 100644 --- a/liblttng-ust/lttng-ring-buffer-client-discard-rt.c +++ b/liblttng-ust/lttng-ring-buffer-client-discard-rt.c @@ -8,6 +8,7 @@ #define _LGPL_SOURCE #include "lttng-tracer.h" +#include "lttng-rb-clients.h" #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_DISCARD #define RING_BUFFER_MODE_TEMPLATE_STRING "discard-rt" diff --git a/liblttng-ust/lttng-ring-buffer-client-discard.c b/liblttng-ust/lttng-ring-buffer-client-discard.c index 82d25fd4..9031c2f2 100644 --- a/liblttng-ust/lttng-ring-buffer-client-discard.c +++ b/liblttng-ust/lttng-ring-buffer-client-discard.c @@ -8,6 +8,7 @@ #define _LGPL_SOURCE #include "lttng-tracer.h" +#include "lttng-rb-clients.h" #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_DISCARD #define RING_BUFFER_MODE_TEMPLATE_STRING "discard" diff --git a/liblttng-ust/lttng-ring-buffer-client-overwrite-rt.c b/liblttng-ust/lttng-ring-buffer-client-overwrite-rt.c index d0b9151b..e27f8bdd 100644 --- a/liblttng-ust/lttng-ring-buffer-client-overwrite-rt.c +++ b/liblttng-ust/lttng-ring-buffer-client-overwrite-rt.c @@ -8,6 +8,7 @@ #define _LGPL_SOURCE #include "lttng-tracer.h" +#include "lttng-rb-clients.h" #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_OVERWRITE #define RING_BUFFER_MODE_TEMPLATE_STRING "overwrite-rt" diff --git a/liblttng-ust/lttng-ring-buffer-client-overwrite.c b/liblttng-ust/lttng-ring-buffer-client-overwrite.c index 2a92faba..da4c946c 100644 --- a/liblttng-ust/lttng-ring-buffer-client-overwrite.c +++ b/liblttng-ust/lttng-ring-buffer-client-overwrite.c @@ -8,6 +8,7 @@ #define _LGPL_SOURCE #include "lttng-tracer.h" +#include "lttng-rb-clients.h" #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_OVERWRITE #define RING_BUFFER_MODE_TEMPLATE_STRING "overwrite" diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index 748417ab..c0a7311f 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include diff --git a/liblttng-ust/lttng-ust-elf.c b/liblttng-ust/lttng-ust-elf.c index 74b3f3ca..3e0b8890 100644 --- a/liblttng-ust/lttng-ust-elf.c +++ b/liblttng-ust/lttng-ust-elf.c @@ -580,6 +580,7 @@ error: * * Returns 0 on success, -1 if an error occurred. */ +static int lttng_ust_elf_get_debug_link_from_section(struct lttng_ust_elf *elf, char **filename, uint32_t *crc, struct lttng_ust_elf_shdr *shdr) diff --git a/liblttng-ust/tracef.c b/liblttng-ust/tracef.c index f9f8274d..4c7e805d 100644 --- a/liblttng-ust/tracef.c +++ b/liblttng-ust/tracef.c @@ -31,6 +31,11 @@ end: return; } +/* + * FIXME: We should include for the declarations here, but it + * fails with tracepoint magic above my paygrade. + */ + void _lttng_ust_vtracef(const char *fmt, va_list ap) __attribute__((format(printf, 1, 0))); void _lttng_ust_vtracef(const char *fmt, va_list ap) diff --git a/liblttng-ust/tracelog.c b/liblttng-ust/tracelog.c index 307e0fce..d69301d8 100644 --- a/liblttng-ust/tracelog.c +++ b/liblttng-ust/tracelog.c @@ -43,6 +43,9 @@ const char *fmt, va_list ap) \ __attribute__ ((format(printf, 4, 0))); \ \ + void _lttng_ust_vtracelog_##level(const char *file, \ + int line, const char *func, \ + const char *fmt, va_list ap); \ void _lttng_ust_vtracelog_##level(const char *file, \ int line, const char *func, \ const char *fmt, va_list ap) \ @@ -55,6 +58,9 @@ const char *fmt, ...) \ __attribute__ ((format(printf, 4, 5))); \ \ + void _lttng_ust_tracelog_##level(const char *file, \ + int line, const char *func, \ + const char *fmt, ...); \ void _lttng_ust_tracelog_##level(const char *file, \ int line, const char *func, \ const char *fmt, ...) \ diff --git a/liblttng-ust/tracepoint-weak-test.c b/liblttng-ust/tracepoint-weak-test.c index 50afe005..abca8319 100644 --- a/liblttng-ust/tracepoint-weak-test.c +++ b/liblttng-ust/tracepoint-weak-test.c @@ -4,6 +4,8 @@ * Copyright (C) 2016 Mathieu Desnoyers */ +#include "tracepoint-internal.h" + /* Test compiler support for weak symbols with hidden visibility. */ int __tracepoint_test_symbol1 __attribute__((weak, visibility("hidden"))); void *__tracepoint_test_symbol2 __attribute__((weak, visibility("hidden"))); diff --git a/liblttng-ust/tracepoint.c b/liblttng-ust/tracepoint.c index 8d41d97a..00fcc740 100644 --- a/liblttng-ust/tracepoint.c +++ b/liblttng-ust/tracepoint.c @@ -829,11 +829,6 @@ end: pthread_mutex_unlock(&tracepoint_mutex); } -void tracepoint_set_new_tracepoint_cb(void (*cb)(struct lttng_ust_tracepoint *)) -{ - new_tracepoint_cb = cb; -} - static void new_tracepoints(struct lttng_ust_tracepoint * const *start, struct lttng_ust_tracepoint * const *end) { @@ -859,6 +854,8 @@ static void new_tracepoints(struct lttng_ust_tracepoint * const *start, * against recent liblttng-ust headers require a recent liblttng-ust * runtime for those tracepoints to be taken into account. */ +int tracepoint_register_lib(struct lttng_ust_tracepoint * const *tracepoints_start, + int tracepoints_count); int tracepoint_register_lib(struct lttng_ust_tracepoint * const *tracepoints_start, int tracepoints_count) { @@ -908,6 +905,7 @@ lib_added: return 0; } +int tracepoint_unregister_lib(struct lttng_ust_tracepoint * const *tracepoints_start); int tracepoint_unregister_lib(struct lttng_ust_tracepoint * const *tracepoints_start) { struct tracepoint_lib *lib; @@ -976,16 +974,19 @@ void lttng_ust_tp_exit(void) #undef tp_rcu_read_unlock #undef tp_rcu_dereference +void tp_rcu_read_lock(void); void tp_rcu_read_lock(void) { lttng_ust_urcu_read_lock(); } +void tp_rcu_read_unlock(void); void tp_rcu_read_unlock(void) { lttng_ust_urcu_read_unlock(); } +void *tp_rcu_dereference_sym(void *p); void *tp_rcu_dereference_sym(void *p) { return lttng_ust_rcu_dereference(p); @@ -1002,6 +1003,7 @@ void *tp_rcu_dereference_sym(void *p) * dlopen(3) and dlsym(3) to get an handle on the * tp_disable_destructors and tp_get_destructors_state symbols below. */ +void tp_disable_destructors(void); void tp_disable_destructors(void) { uatomic_set(&tracepoint_destructors_state, 0); @@ -1011,6 +1013,7 @@ void tp_disable_destructors(void) * Returns 1 if the destructors are enabled and should be executed. * Returns 0 if the destructors are disabled. */ +int tp_get_destructors_state(void); int tp_get_destructors_state(void) { return uatomic_read(&tracepoint_destructors_state); diff --git a/snprintf/mbrtowc_sb.c b/snprintf/mbrtowc_sb.c index 3601c3b0..6fcf93e8 100644 --- a/snprintf/mbrtowc_sb.c +++ b/snprintf/mbrtowc_sb.c @@ -12,6 +12,8 @@ #include #include +#include "various.h" + /*ARGSUSED*/ size_t ust_safe_mbrtowc(wchar_t *pwc, const char *s, size_t n, diff --git a/snprintf/vfprintf.c b/snprintf/vfprintf.c index ff728486..5cb356c2 100644 --- a/snprintf/vfprintf.c +++ b/snprintf/vfprintf.c @@ -33,6 +33,7 @@ #include "local.h" #include "fvwrite.h" +#include "various.h" union arg { int intarg; diff --git a/tests/benchmark/bench.c b/tests/benchmark/bench.c index 166dc910..d42d0b65 100644 --- a/tests/benchmark/bench.c +++ b/tests/benchmark/bench.c @@ -37,6 +37,7 @@ static unsigned long duration; static volatile int test_go, test_stop; +static void do_stuff(void) { int i; @@ -51,6 +52,8 @@ void do_stuff(void) #endif } + +static void *function(void *arg) { unsigned long long nr_loops = 0; @@ -69,6 +72,7 @@ void *function(void *arg) return NULL; } +static void usage(char **argv) { printf("Usage: %s nr_threads duration(s) \n", argv[0]); printf("OPTIONS:\n"); diff --git a/tests/compile/hello.cxx/hello.cpp b/tests/compile/hello.cxx/hello.cpp index e9591b84..bd40323e 100644 --- a/tests/compile/hello.cxx/hello.cpp +++ b/tests/compile/hello.cxx/hello.cpp @@ -20,12 +20,14 @@ #define TRACEPOINT_DEFINE #include "ust_tests_hello.h" +static void inthandler(int sig) { printf("in SIGUSR1 handler\n"); tracepoint(ust_tests_hello, tptest_sighandler); } +static int init_int_handler(void) { int result; diff --git a/tests/compile/hello/hello.c b/tests/compile/hello/hello.c index a868a559..9ef33099 100644 --- a/tests/compile/hello/hello.c +++ b/tests/compile/hello/hello.c @@ -26,12 +26,14 @@ struct mmsghdr; #define TRACEPOINT_DEFINE #include "ust_tests_hello.h" +static void inthandler(int sig) { printf("in SIGUSR1 handler\n"); tracepoint(ust_tests_hello, tptest_sighandler); } +static int init_int_handler(void) { int result; @@ -59,8 +61,6 @@ int init_int_handler(void) return 0; } -void test_inc_count(void); - int main(int argc, char **argv) { int i, netint; diff --git a/tests/compile/same_line_tracepoint/same_line_tracepoint.c b/tests/compile/same_line_tracepoint/same_line_tracepoint.c index 46d31eb3..2f6f1eac 100644 --- a/tests/compile/same_line_tracepoint/same_line_tracepoint.c +++ b/tests/compile/same_line_tracepoint/same_line_tracepoint.c @@ -8,7 +8,7 @@ #define TRACEPOINT_CREATE_PROBES #include "ust_tests_sameline.h" -int main() +int main(void) { tracepoint(ust_tests_sameline, event1); tracepoint(ust_tests_sameline, event2); return 0; diff --git a/tests/compile/test-app-ctx/hello.c b/tests/compile/test-app-ctx/hello.c index 6e16b12f..c08fa8dd 100644 --- a/tests/compile/test-app-ctx/hello.c +++ b/tests/compile/test-app-ctx/hello.c @@ -35,6 +35,7 @@ struct mmsghdr; static __thread unsigned int test_count; +static void test_inc_count(void) { test_count++; @@ -250,12 +251,14 @@ struct lttng_ust_context_provider myprovider = { .get_value = test_get_value, }; +static void inthandler(int sig) { printf("in SIGUSR1 handler\n"); tracepoint(ust_tests_hello, tptest_sighandler); } +static int init_int_handler(void) { int result; @@ -283,8 +286,6 @@ int init_int_handler(void) return 0; } -void test_inc_count(void); - int main(int argc, char **argv) { int i, netint; diff --git a/tests/unit/gcc-weak-hidden/Makefile.am b/tests/unit/gcc-weak-hidden/Makefile.am index 980947ab..b89e383c 100644 --- a/tests/unit/gcc-weak-hidden/Makefile.am +++ b/tests/unit/gcc-weak-hidden/Makefile.am @@ -3,9 +3,9 @@ AM_CPPFLAGS += -I$(top_srcdir)/tests/utils noinst_LTLIBRARIES = libgcc-wh.la -libgcc_wh_la_SOURCES = c.c d.c +libgcc_wh_la_SOURCES = libgcc-wh1.c libgcc-wh2.c libgcc-wh.h noinst_PROGRAMS = test_gcc_weak_hidden -test_gcc_weak_hidden_SOURCES = main.c b.c +test_gcc_weak_hidden_SOURCES = main.c b.c b.h test_gcc_weak_hidden_LDADD = $(top_builddir)/tests/utils/libtap.a \ $(builddir)/libgcc-wh.la diff --git a/tests/unit/gcc-weak-hidden/b.c b/tests/unit/gcc-weak-hidden/b.c index 6344a752..5c9cee6f 100644 --- a/tests/unit/gcc-weak-hidden/b.c +++ b/tests/unit/gcc-weak-hidden/b.c @@ -2,6 +2,8 @@ * SPDX-License-Identifier: LGPL-2.1-only */ +#include "b.h" + int testint __attribute__((weak, visibility("hidden"))); void *testptr __attribute__((weak, visibility("hidden"))); struct { diff --git a/tests/unit/gcc-weak-hidden/b.h b/tests/unit/gcc-weak-hidden/b.h new file mode 100644 index 00000000..88a708ad --- /dev/null +++ b/tests/unit/gcc-weak-hidden/b.h @@ -0,0 +1,12 @@ +/* + * SPDX-License-Identifier: LGPL-2.1-only + */ + +#ifndef _UST_TEST_WEAK_B_H +#define _UST_TEST_WEAK_B_H + +void *testfct_int(void); +void *testfct_ptr(void); +void *testfct_24_bytes(void); + +#endif diff --git a/tests/unit/gcc-weak-hidden/c.c b/tests/unit/gcc-weak-hidden/c.c deleted file mode 100644 index 8f3cef0f..00000000 --- a/tests/unit/gcc-weak-hidden/c.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * SPDX-License-Identifier: LGPL-2.1-only - */ - -int testint __attribute__((weak, visibility("hidden"))); -void *testptr __attribute__((weak, visibility("hidden"))); -struct { - char a[24]; -} testsym_24_bytes __attribute__((weak, visibility("hidden"))); - -void *testlibfct1_int(void) -{ - return &testint; -} - -void *testlibfct1_ptr(void) -{ - return &testptr; -} - -void *testlibfct1_24_bytes(void) -{ - return &testsym_24_bytes; -} diff --git a/tests/unit/gcc-weak-hidden/d.c b/tests/unit/gcc-weak-hidden/d.c deleted file mode 100644 index 23d432ed..00000000 --- a/tests/unit/gcc-weak-hidden/d.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * SPDX-License-Identifier: LGPL-2.1-only - */ - -int testint __attribute__((weak, visibility("hidden"))); -void *testptr __attribute__((weak, visibility("hidden"))); -struct { - char a[24]; -} testsym_24_bytes __attribute__((weak, visibility("hidden"))); - -void *testlibfct2_int(void) -{ - return &testint; -} - -void *testlibfct2_ptr(void) -{ - return &testptr; -} - -void *testlibfct2_24_bytes(void) -{ - return &testsym_24_bytes; -} diff --git a/tests/unit/gcc-weak-hidden/libgcc-wh.h b/tests/unit/gcc-weak-hidden/libgcc-wh.h new file mode 100644 index 00000000..af2b2a13 --- /dev/null +++ b/tests/unit/gcc-weak-hidden/libgcc-wh.h @@ -0,0 +1,16 @@ +/* + * SPDX-License-Identifier: LGPL-2.1-only + */ + +#ifndef _UST_TEST_WEAK_LIBGCC_H +#define _UST_TEST_WEAK_LIBGCC_H + +void *testlibfct1_int(void); +void *testlibfct1_ptr(void); +void *testlibfct1_24_bytes(void); + +void *testlibfct2_int(void); +void *testlibfct2_ptr(void); +void *testlibfct2_24_bytes(void); + +#endif diff --git a/tests/unit/gcc-weak-hidden/libgcc-wh1.c b/tests/unit/gcc-weak-hidden/libgcc-wh1.c new file mode 100644 index 00000000..d6ab0c9e --- /dev/null +++ b/tests/unit/gcc-weak-hidden/libgcc-wh1.c @@ -0,0 +1,26 @@ +/* + * SPDX-License-Identifier: LGPL-2.1-only + */ + +#include "libgcc-wh.h" + +int testint __attribute__((weak, visibility("hidden"))); +void *testptr __attribute__((weak, visibility("hidden"))); +struct { + char a[24]; +} testsym_24_bytes __attribute__((weak, visibility("hidden"))); + +void *testlibfct1_int(void) +{ + return &testint; +} + +void *testlibfct1_ptr(void) +{ + return &testptr; +} + +void *testlibfct1_24_bytes(void) +{ + return &testsym_24_bytes; +} diff --git a/tests/unit/gcc-weak-hidden/libgcc-wh2.c b/tests/unit/gcc-weak-hidden/libgcc-wh2.c new file mode 100644 index 00000000..722f2f43 --- /dev/null +++ b/tests/unit/gcc-weak-hidden/libgcc-wh2.c @@ -0,0 +1,26 @@ +/* + * SPDX-License-Identifier: LGPL-2.1-only + */ + +#include "libgcc-wh.h" + +int testint __attribute__((weak, visibility("hidden"))); +void *testptr __attribute__((weak, visibility("hidden"))); +struct { + char a[24]; +} testsym_24_bytes __attribute__((weak, visibility("hidden"))); + +void *testlibfct2_int(void) +{ + return &testint; +} + +void *testlibfct2_ptr(void) +{ + return &testptr; +} + +void *testlibfct2_24_bytes(void) +{ + return &testsym_24_bytes; +} diff --git a/tests/unit/gcc-weak-hidden/main.c b/tests/unit/gcc-weak-hidden/main.c index 63a8c75a..37f2f6ad 100644 --- a/tests/unit/gcc-weak-hidden/main.c +++ b/tests/unit/gcc-weak-hidden/main.c @@ -5,6 +5,7 @@ */ #include +#include "b.h" #include "tap.h" #define NUM_TESTS 2 @@ -39,7 +40,7 @@ enum { static bool match_matrix[NR_MATCH]; -int main() +int main(void) { plan_tests(NUM_TESTS); diff --git a/tests/unit/libringbuffer/shm.c b/tests/unit/libringbuffer/shm.c index fe3cb6c0..60b8e6fe 100644 --- a/tests/unit/libringbuffer/shm.c +++ b/tests/unit/libringbuffer/shm.c @@ -19,7 +19,7 @@ #define SHM_PATH "/ust-shm-test" -int main() +int main(void) { int shmfd; size_t shmsize = LTTNG_UST_PAGE_SIZE * 10; diff --git a/tests/unit/pthread_name/pthread_name.c b/tests/unit/pthread_name/pthread_name.c index 56412635..b48712db 100644 --- a/tests/unit/pthread_name/pthread_name.c +++ b/tests/unit/pthread_name/pthread_name.c @@ -12,7 +12,7 @@ #define TEST_NAME_PROPER_LEN 16 -int main() +int main(void) { int ret; char name1[TEST_NAME_PROPER_LEN]; diff --git a/tests/unit/snprintf/snprintf.c b/tests/unit/snprintf/snprintf.c index 539bb0ac..00fd02a0 100644 --- a/tests/unit/snprintf/snprintf.c +++ b/tests/unit/snprintf/snprintf.c @@ -10,7 +10,7 @@ #include "tap.h" -int main() +int main(void) { char buf[100]; const char expected_str[] = "header 9999, hello, 005, ' 9'";