1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-24 21:34:08 +03:00

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)
 ^~~~~~~~~~~~~
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2017-02-04 10:25:20 -05:00 committed by GitHub
parent c37fb55bd8
commit cfe5b07106
2 changed files with 2 additions and 0 deletions

View File

@ -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"

View File

@ -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"