tests: add declaration for test_function in userspace-probe-elf-binary.c
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 25 Nov 2019 21:04:50 +0000 (16:04 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 6 Dec 2019 13:21:19 +0000 (08:21 -0500)
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 <simon.marchi@efficios.com>
Change-Id: I52019f69de023b24b46cc701e2e0df919e654a76
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/utils/testapp/userspace-probe-elf-binary/userspace-probe-elf-binary.c

index a9dfb22b4cccc1ae7cd679257cba77a8b0b700c6..8488c8a3940ffb9770ca94cba79f553db6d22c9d 100644 (file)
 
 #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();
This page took 0.033779 seconds and 4 git commands to generate.