diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-02-04 10:25:20 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-04 10:25:20 -0500 |
commit | cfe5b07106e0b2049de542a4bdcf3334b0352bbe (patch) | |
tree | 53bc3fdb10720c9d33c3613ea24ba0f8de832aae /src/test | |
parent | c37fb55bd856a62757e0b6673116959e645f85cf (diff) |
Silence two "unused function af_lookup" warnings (#5222)
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)
^~~~~~~~~~~~~
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test-af-list.c | 1 | ||||
-rw-r--r-- | src/test/test-arphrd-list.c | 1 |
2 files changed, 2 insertions, 0 deletions
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" |