From c902a0d224198a36ad3bc07a39fb6cad46cb84e3 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 16 Feb 2019 10:43:17 +0100 Subject: [PATCH] make clang shut up about #5573 --- src/include/gnunet_common.h | 1 + src/util/dnsparser.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index 57b6dd9f2..ca49d3109 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h @@ -119,6 +119,7 @@ extern "C" */ #define GNUNET_VA_ARG_ENUM(va,X) ((enum X) va_arg (va, int)) + /** * @ingroup logging * define #GNUNET_EXTRA_LOGGING if using this header outside the GNUnet source diff --git a/src/util/dnsparser.c b/src/util/dnsparser.c index 55a9ff6c8..7546ca1e9 100644 --- a/src/util/dnsparser.c +++ b/src/util/dnsparser.c @@ -1088,12 +1088,19 @@ GNUNET_DNSPARSER_builder_add_cert (char *dst, { struct GNUNET_TUN_DnsCertRecord dcert; +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-constant-out-of-range-compare" +#endif if ( (cert->cert_type > UINT16_MAX) || (cert->algorithm > UINT8_MAX) ) { GNUNET_break (0); return GNUNET_SYSERR; } +#ifdef __clang__ +#pragma clang diagnostic pop +#endif if (*off + sizeof (struct GNUNET_TUN_DnsCertRecord) + cert->certificate_size > dst_len) return GNUNET_NO; dcert.cert_type = htons ((uint16_t) cert->cert_type); -- 2.25.1