diff options
author | Tim Rühsen <tim.ruehsen@gmx.de> | 2018-05-24 12:45:32 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2018-05-26 18:35:37 +0000 |
commit | 158590341e2f75aa87562181c9dfa8d5ddeacfb6 (patch) | |
tree | db258ba6c44302ad330afbdf5f7146f258a2cf49 /tests/tls13 | |
parent | 0f5d76ad336e3044c850b625df3af987625844ae (diff) | |
download | gnutls-158590341e2f75aa87562181c9dfa8d5ddeacfb6.tar.gz |
Fix more warnings in tests/
To not introduce larger code changes, these bugs are mostly
fixed by #pragma understood by gcc and clang.
A check for the minimal gcc/clang version prevents warnings about
unknown pragmas with other or older compilers.
Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
Diffstat (limited to 'tests/tls13')
-rw-r--r-- | tests/tls13/ext-parse.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/tls13/ext-parse.h b/tests/tls13/ext-parse.h index ff8a200768..ae9c1c8afb 100644 --- a/tests/tls13/ext-parse.h +++ b/tests/tls13/ext-parse.h @@ -44,6 +44,11 @@ typedef void (*ext_parse_func)(void *priv, gnutls_datum_t *extdata); #define HANDSHAKE_SESSION_ID_POS 34 +#if defined __clang__ || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif + /* Returns 0 if the extension was not found, 1 otherwise. */ static unsigned find_client_extension(const gnutls_datum_t *msg, unsigned extnr, void *priv, ext_parse_func cb) @@ -164,3 +169,7 @@ static unsigned find_server_extension(const gnutls_datum_t *msg, unsigned extnr, return 0; } + +#if defined __clang__ || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) +# pragma GCC diagnostic pop +#endif |