From: Christian Grothoff Date: Sat, 16 Feb 2019 09:43:17 +0000 (+0100) Subject: make clang shut up about #5573 X-Git-Tag: v0.11.0~63^2~51 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c902a0d224198a36ad3bc07a39fb6cad46cb84e3;p=oweals%2Fgnunet.git make clang shut up about #5573 --- 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);