From bcf66e7d327496653738061614900f9828553432 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 25 Nov 2019 16:04:50 -0500 Subject: [PATCH 1/1] tests: add declaration for test_function in userspace-probe-elf-binary.c MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes: CC userspace-probe-elf-binary.o /home/smarchi/src/lttng-tools/tests/utils/testapp/userspace-probe-elf-binary/userspace-probe-elf-binary.c:21:34: error: no previous declaration for ‘test_function’ [-Werror=missing-declarations] void __attribute__ ((noinline)) test_function() ^~~~~~~~~~~~~ I did not make test_function static, because from what I understand, it is important that test_function remains an exported symbol, for example for test regression/kernel/test_userspace_probe. Signed-off-by: Simon Marchi Change-Id: I52019f69de023b24b46cc701e2e0df919e654a76 Signed-off-by: Jérémie Galarneau --- .../userspace-probe-elf-binary/userspace-probe-elf-binary.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/utils/testapp/userspace-probe-elf-binary/userspace-probe-elf-binary.c b/tests/utils/testapp/userspace-probe-elf-binary/userspace-probe-elf-binary.c index a9dfb22b4..8488c8a39 100644 --- a/tests/utils/testapp/userspace-probe-elf-binary/userspace-probe-elf-binary.c +++ b/tests/utils/testapp/userspace-probe-elf-binary/userspace-probe-elf-binary.c @@ -18,10 +18,13 @@ #include "foo.h" volatile int not_a_function = 0; -void __attribute__ ((noinline)) test_function() + +void __attribute__ ((noinline)) test_function(); +void __attribute__ ((noinline)) test_function() { not_a_function += 1; } + int main(int argc, char *argv[]) { test_function(); -- 2.34.1