From 3f345083f4324ec038b70298b6a8571d13611590 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 25 Mar 2020 18:39:52 -0400 Subject: [PATCH] Fix: tests: include callsites.h from callsites.c MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit In commit: commit f12eb9c1ceb619db54be0842323a32cda12651cd Author: Simon Marchi Date: Mon Nov 25 16:41:29 2019 -0500 Fix all -Wmissing-declarations warning instances I've fixed the -Wmissing-declarations warning in callsites.c by adding a local declaration. That was wrong, since there is actually a callsites.h header file that needs to be included, which contains the declaration. This is nicely pointed out when building with clang and -Wstrict-prototypes: CC exec_with_callsites-multi-lib-test.o In file included from /home/simark/src/lttng-tools/tests/regression/ust/multi-lib/multi-lib-test.c:15: /home/simark/src/lttng-tools/tests/regression/ust/multi-lib/callsites.h:10:21: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] void call_tracepoint(); ^ void Remove the local declaration and include callsites.h in callsites.c. Change-Id: Ib656d96c2ed3b389697a2022e343e98ac0b66447 Signed-off-by: Simon Marchi Signed-off-by: Jérémie Galarneau --- tests/regression/ust/multi-lib/callsites.c | 3 ++- tests/regression/ust/multi-lib/callsites.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/regression/ust/multi-lib/callsites.c b/tests/regression/ust/multi-lib/callsites.c index a67f102b4..ed86a0ed9 100644 --- a/tests/regression/ust/multi-lib/callsites.c +++ b/tests/regression/ust/multi-lib/callsites.c @@ -14,11 +14,12 @@ #include #include +#include "callsites.h" + #ifndef VALUE #define VALUE (-1) #endif -void call_tracepoint(void); void call_tracepoint(void) { tracepoint(multi, tp, VALUE); diff --git a/tests/regression/ust/multi-lib/callsites.h b/tests/regression/ust/multi-lib/callsites.h index 367b85b99..059d8f791 100644 --- a/tests/regression/ust/multi-lib/callsites.h +++ b/tests/regression/ust/multi-lib/callsites.h @@ -7,5 +7,5 @@ #ifndef CALLSITES_H #define CALLSITES_H -void call_tracepoint(); +void call_tracepoint(void); #endif /* CALLSITES_H */ -- 2.34.1