From 0421fc837c822e86c76884a30a9155e512a5a66a Mon Sep 17 00:00:00 2001 From: Peter Foley Date: Thu, 25 Sep 2014 11:23:15 -0700 Subject: Documentation: make functions static to avoid prototype warnings Signed-off-by: Peter Foley Signed-off-by: Randy Dunlap Signed-off-by: Jiri Kosina --- Documentation/prctl/disable-tsc-on-off-stress-test.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Documentation/prctl/disable-tsc-on-off-stress-test.c') diff --git a/Documentation/prctl/disable-tsc-on-off-stress-test.c b/Documentation/prctl/disable-tsc-on-off-stress-test.c index 1fcd91445375..4d83a27627f9 100644 --- a/Documentation/prctl/disable-tsc-on-off-stress-test.c +++ b/Documentation/prctl/disable-tsc-on-off-stress-test.c @@ -29,7 +29,8 @@ /* snippet from wikipedia :-) */ -uint64_t rdtsc() { +static uint64_t rdtsc(void) +{ uint32_t lo, hi; /* We cannot use "=A", since this would use %rax on x86_64 */ __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi)); @@ -38,7 +39,7 @@ return (uint64_t)hi << 32 | lo; int should_segv = 0; -void sigsegv_cb(int sig) +static void sigsegv_cb(int sig) { if (!should_segv) { @@ -55,7 +56,7 @@ void sigsegv_cb(int sig) rdtsc(); } -void task(void) +static void task(void) { signal(SIGSEGV, sigsegv_cb); alarm(10); -- cgit v1.2.3-59-g8ed1b