From cfe5b07106e0b2049de542a4bdcf3334b0352bbe Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Sat, 4 Feb 2017 10:25:20 -0500 Subject: Silence two "unused function af_lookup" warnings (#5222) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Gcc7 is smarter about detecting unused functions and detects those two functions which are unused in tests. But gperf generates them for us, so let's instead of removing tell gcc that we know they might be unused in the test code. In file included from ../src/test/test-af-list.c:29:0: ./src/basic/af-from-name.h:140:1: warning: ‘lookup_af’ defined but not used [-Wunused-function] lookup_af (register const char *str, register size_t len) ^~~~~~~~~ In file included from ../src/test/test-arphrd-list.c:29:0: ./src/basic/arphrd-from-name.h:125:1: warning: ‘lookup_arphrd’ defined but not used [-Wunused-function] lookup_arphrd (register const char *str, register size_t len) ^~~~~~~~~~~~~ --- src/test/test-af-list.c | 1 + src/test/test-arphrd-list.c | 1 + 2 files changed, 2 insertions(+) (limited to 'src') diff --git a/src/test/test-af-list.c b/src/test/test-af-list.c index e2479133de..e5ca54c8e7 100644 --- a/src/test/test-af-list.c +++ b/src/test/test-af-list.c @@ -24,6 +24,7 @@ #include "string-util.h" #include "util.h" +_unused_ \ static const struct af_name* lookup_af(register const char *str, register GPERF_LEN_TYPE len); #include "af-from-name.h" diff --git a/src/test/test-arphrd-list.c b/src/test/test-arphrd-list.c index 8f4f342faa..bb51518c9c 100644 --- a/src/test/test-arphrd-list.c +++ b/src/test/test-arphrd-list.c @@ -24,6 +24,7 @@ #include "string-util.h" #include "util.h" +_unused_ \ static const struct arphrd_name* lookup_arphrd(register const char *str, register GPERF_LEN_TYPE len); #include "arphrd-from-name.h" -- cgit v1.2.3-54-g00ecf