lkml.org 
[lkml]   [2018]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH][next] lib: make function test_ubsan_misaligned_access static
Date
From: Colin Ian King <colin.king@canonical.com>

The function test_ubsan_misaligned_access is local to the source and does
not need to be in global scope, so make it static.

Cleans up sparse warning:
lib/test_ubsan.c:91:6: warning: symbol 'test_ubsan_misaligned_access' was
not declared. Should it be static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
lib/test_ubsan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/test_ubsan.c b/lib/test_ubsan.c
index 58dedff36b17..280f4979d00e 100644
--- a/lib/test_ubsan.c
+++ b/lib/test_ubsan.c
@@ -88,7 +88,7 @@ static void test_ubsan_null_ptr_deref(void)
val = *ptr;
}

-void test_ubsan_misaligned_access(void)
+static void test_ubsan_misaligned_access(void)
{
volatile char arr[5] __aligned(4) = {1, 2, 3, 4, 5};
volatile int *ptr, val = 6;
--
2.15.1
\
 
 \ /
  Last update: 2018-03-13 11:31    [W:0.021 / U:25.280 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site