summaryrefslogtreecommitdiff
path: root/tests/gnutls_record_overhead.c
diff options
context:
space:
mode:
authorTim Rühsen <tim.ruehsen@gmx.de>2018-05-24 12:45:32 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2018-05-26 18:35:37 +0000
commit158590341e2f75aa87562181c9dfa8d5ddeacfb6 (patch)
treedb258ba6c44302ad330afbdf5f7146f258a2cf49 /tests/gnutls_record_overhead.c
parent0f5d76ad336e3044c850b625df3af987625844ae (diff)
downloadgnutls-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/gnutls_record_overhead.c')
-rw-r--r--tests/gnutls_record_overhead.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/gnutls_record_overhead.c b/tests/gnutls_record_overhead.c
index f07f0b232b..541d7c5e82 100644
--- a/tests/gnutls_record_overhead.c
+++ b/tests/gnutls_record_overhead.c
@@ -48,8 +48,11 @@
#define gnutls_assert()
#define gnutls_assert_val(val) val
+/* #pragma doesn't work to suppress preprocessor warnings like -Wunused-macros.
+ * So we just use the above defined macros here. */
+#if defined _gnutls_debug_log && defined gnutls_assert && defined gnutls_assert_val
#include "../lib/algorithms.h"
-
+#endif
unsigned _gnutls_record_overhead(const version_entry_st *ver,
const cipher_entry_st *cipher,