fix: all functions have declarations (-Wmissing-prototypes -Wold-style-definition)
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 24 Mar 2021 20:12:34 +0000 (16:12 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 31 Mar 2021 18:21:15 +0000 (14:21 -0400)
Make sure that all non-static functions have a declaration.

Change-Id: I4057795631c53c4281127457a1ee5a538ee7fcce
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
39 files changed:
doc/examples/clock-override/lttng-ust-clock-override-example.c
doc/examples/getcpu-override/lttng-ust-getcpu-override-example.c
doc/examples/hello-static-lib/hello.c
liblttng-ust-comm/lttng-ust-fd-tracker.c
liblttng-ust-libc-wrapper/lttng-ust-malloc.c
liblttng-ust-python-agent/lttng_ust_python.c
liblttng-ust/event-notifier-notification.c
liblttng-ust/lttng-bytecode.c
liblttng-ust/lttng-context-procname.c
liblttng-ust/lttng-events.c
liblttng-ust/lttng-ring-buffer-client-discard-rt.c
liblttng-ust/lttng-ring-buffer-client-discard.c
liblttng-ust/lttng-ring-buffer-client-overwrite-rt.c
liblttng-ust/lttng-ring-buffer-client-overwrite.c
liblttng-ust/lttng-ust-comm.c
liblttng-ust/lttng-ust-elf.c
liblttng-ust/tracef.c
liblttng-ust/tracelog.c
liblttng-ust/tracepoint-weak-test.c
liblttng-ust/tracepoint.c
snprintf/mbrtowc_sb.c
snprintf/vfprintf.c
tests/benchmark/bench.c
tests/compile/hello.cxx/hello.cpp
tests/compile/hello/hello.c
tests/compile/same_line_tracepoint/same_line_tracepoint.c
tests/compile/test-app-ctx/hello.c
tests/unit/gcc-weak-hidden/Makefile.am
tests/unit/gcc-weak-hidden/b.c
tests/unit/gcc-weak-hidden/b.h [new file with mode: 0644]
tests/unit/gcc-weak-hidden/c.c [deleted file]
tests/unit/gcc-weak-hidden/d.c [deleted file]
tests/unit/gcc-weak-hidden/libgcc-wh.h [new file with mode: 0644]
tests/unit/gcc-weak-hidden/libgcc-wh1.c [new file with mode: 0644]
tests/unit/gcc-weak-hidden/libgcc-wh2.c [new file with mode: 0644]
tests/unit/gcc-weak-hidden/main.c
tests/unit/libringbuffer/shm.c
tests/unit/pthread_name/pthread_name.c
tests/unit/snprintf/snprintf.c

index b1c3c3c4515532081b79d9b80d6fa0fb8e7b16c7..7b8201b2d52617f75dd9139ce34ebb6a7400c727 100644 (file)
@@ -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;
index 084079c0ffdbb84204886f019bf8a51ceb2c9eff..58f7999724b2c739bbb5529ffda8dd61979ed9c5 100644 (file)
@@ -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;
index e7133c5de4d0132985a053e71df3d527c36bb12b..e54b1e1be0e1711d61cbabf8c34b4d2d994900a6 100644 (file)
 #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;
index c9b5fdc0250c72d3538fe6fc9d35b77c45ce3d31..18456e08ee88169f4dc9235e96d520664e74a309 100644 (file)
@@ -31,6 +31,7 @@
 #include <usterr-signal-safe.h>
 
 #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)
index f8c7aa8b967c0d8cdb218619b7dd33a3a375ea82..d407985f58c9d6abd306bd32ba1d3ebddfc885be 100644 (file)
 #include <sys/types.h>
 #include <stdio.h>
 #include <assert.h>
+#include <malloc.h>
+
 #include <urcu/system.h>
 #include <urcu/uatomic.h>
 #include <urcu/compiler.h>
 #include <urcu/tls-compat.h>
 #include <urcu/arch.h>
+
+#include <lttng/ust-libc-wrapper.h>
+
 #include <ust-helper.h>
 #include "ust-compat.h"
 
index 9be0cf79420fc2ee6074e7ac0a027cfe13372cb4..f2efb4ea6c3d4d66de61712a67faa0317464caae 100644 (file)
@@ -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)
index 422233265944f0dc991a90110f5027dabd508358..b9b0a7c61412d3a392bb95a26cabb439884a039b 100644 (file)
@@ -14,6 +14,7 @@
 #include <usterr-signal-safe.h>
 #include <urcu/rculist.h>
 
+#include "lttng-tracer-core.h"
 #include "ust-events-internal.h"
 #include "../libmsgpack/msgpack.h"
 #include "lttng-bytecode.h"
index d4161fc3b451e0973af95729e823b08431ed9756..67fb1a0677d0d14c4ebfa910971e59cf3dbca53a 100644 (file)
@@ -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)
 {
index 2e2c7fa2ef14a6227007f6746c752d42923fc947..a65585deb981656d764303f339325c9df503412c 100644 (file)
@@ -14,6 +14,7 @@
 #include <urcu/tls-compat.h>
 #include <assert.h>
 #include "compat.h"
+#include "lttng-tracer-core.h"
 
 #include "context-internal.h"
 
index e92d057490a93bdaad274721c85a5a3084ffc63f..d411dcf1594185f4552266a91b50c3031fb48095 100644 (file)
@@ -58,6 +58,7 @@
 #include "../libcounter/counter.h"
 #include "jhash.h"
 #include <lttng/ust-abi.h>
+#include "context-provider-internal.h"
 
 /*
  * All operations within this file are called by the communication
index 0c5884b742cb956d5a6ca5a53ea05a8a1c68d557..c76ce9dfc747f872241e98812bf28ec010091b1c 100644 (file)
@@ -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"
index 82d25fd4a498e708ddcbdc12d4758ff228ea5331..9031c2f23dd01bc83bd7e8cd79ab4b607dabfd50 100644 (file)
@@ -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"
index d0b9151b3de39009c7fa7b203f422fe012e630f8..e27f8bdde1939e7b08b8cd9f17cd2f3185cc3e00 100644 (file)
@@ -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"
index 2a92fabac5678e4b6afa591884941ee7f9685ee9..da4c946cf05c68c2854bf1c12e119d82b1b6c525 100644 (file)
@@ -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"
index 748417ab3e366a2edb827bd8668e4bdd5cb806ac..c0a7311fa66e7797c62c8a207a429e28ad190dcf 100644 (file)
@@ -36,6 +36,7 @@
 #include <lttng/ust-error.h>
 #include <lttng/ust-ctl.h>
 #include <lttng/ust-libc-wrapper.h>
+#include <lttng/ust-thread.h>
 #include <lttng/ust-tracer.h>
 #include <urcu/tls-compat.h>
 #include <ust-comm.h>
index 74b3f3ca661aac9fe3b9e4e43f7dbe6f8c8388fd..3e0b8890559bd968c45d523fd643c35005f01b99 100644 (file)
@@ -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)
index f9f8274d476e9e1c0ea8e89df9dbc7657bd84caa..4c7e805da9d59d7805e1e6beaa7f0609e8e65f63 100644 (file)
@@ -31,6 +31,11 @@ end:
        return;
 }
 
+/*
+ * FIXME: We should include <lttng/tracef.h> 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)
index 307e0fce2fe434a3e55e00b6b6d3d52eb5ed588d..d69301d80210d084a631c81f2193b14550965468 100644 (file)
@@ -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, ...) \
index 50afe005cb75eb3433aa437af1e9e9de45d4d891..abca8319ea567d73d8c70288f3c39721836982e9 100644 (file)
@@ -4,6 +4,8 @@
  * Copyright (C) 2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
+#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")));
index 8d41d97a7793c79f56a9a1d9cc51c4f9b2f60fd6..00fcc740101b5f443d77fba5b8596f3053643302 100644 (file)
@@ -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);
index 3601c3b06211796dbec60b0bc655178b4944bf35..6fcf93e81b56e51f096fda0827e892eea35da023 100644 (file)
@@ -12,6 +12,8 @@
 #include <stdlib.h>
 #include <wchar.h>
 
+#include "various.h"
+
 /*ARGSUSED*/
 size_t
 ust_safe_mbrtowc(wchar_t *pwc, const char *s, size_t n,
index ff7284867c824bab25146500c7d62fca87795870..5cb356c2beda6095cdd47113c968b5ad9bc67082 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "local.h"
 #include "fvwrite.h"
+#include "various.h"
 
 union arg {
        int                     intarg;
index 166dc910b426c24fda47af5f1c49a7649eeb6904..d42d0b65a1237d3c22e8ee445dd3b57ca56b27b7 100644 (file)
@@ -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) <OPTIONS>\n", argv[0]);
        printf("OPTIONS:\n");
index e9591b843dda3d10f98f0a37473bf184afd4bf5d..bd40323ef37647140c29bf492932de321c260fd2 100644 (file)
 #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;
index a868a559bde9316079246509971e13f6c52c7a0c..9ef33099b54aae31950f69fa4c1acc1c96c2b601 100644 (file)
@@ -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;
index 46d31eb32afa371d142a4d2f2e5bdfd757843341..2f6f1eac18aa6b1e7bd0c8f0a63ab905a71e9cbe 100644 (file)
@@ -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;
index 6e16b12fac871b19e011fc60f03a6433b6df0990..c08fa8dd0347eef348aa0ebafa389796d9397264 100644 (file)
@@ -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;
index 980947ab96eba885ca91c6d5a0ba2ab69dde3527..b89e383c4605f18d0a18fd0312dbc584d1f7f822 100644 (file)
@@ -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
index 6344a75290ebf93cf68c678393dfbf10756095c6..5c9cee6f466413d3108fa2c5ce6fae8ecb5cc110 100644 (file)
@@ -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 (file)
index 0000000..88a708a
--- /dev/null
@@ -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 (file)
index 8f3cef0..0000000
+++ /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 (file)
index 23d432e..0000000
+++ /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 (file)
index 0000000..af2b2a1
--- /dev/null
@@ -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 (file)
index 0000000..d6ab0c9
--- /dev/null
@@ -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 (file)
index 0000000..722f2f4
--- /dev/null
@@ -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;
+}
index 63a8c75ac7bc122317d1b8422767fa124eacb88b..37f2f6ad40f97080c8b42bc6e1d72516ac45bb51 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <stdbool.h>
+#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);
 
index fe3cb6c0055f70b1d58c41ecb6291cbaef3b56bd..60b8e6fef866a65879fb27b113189637e3458356 100644 (file)
@@ -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;
index 564126356429333679c005ecb3c155cd264b4bed..b48712db565521cb30622e305ca17bbb1f157301 100644 (file)
@@ -12,7 +12,7 @@
 
 #define TEST_NAME_PROPER_LEN 16
 
-int main()
+int main(void)
 {
        int ret;
        char name1[TEST_NAME_PROPER_LEN];
index 539bb0ac7c85eae191f363335488206230456f66..00fd02a0c91d4d79475836680207058c9711e1b3 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "tap.h"
 
-int main()
+int main(void)
 {
        char buf[100];
        const char expected_str[] = "header 9999, hello, 005, '    9'";
This page took 0.041291 seconds and 4 git commands to generate.