aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-02-16 10:43:17 +0100
committerChristian Grothoff <christian@grothoff.org>2019-02-16 10:52:50 +0100
commitc902a0d224198a36ad3bc07a39fb6cad46cb84e3 (patch)
tree00e8c60a42cfb56d2c102702415b1fe39d5fc871 /src
parentcaa65b8a2ff574d1ca933333a8343dcce2cbadf6 (diff)
downloadgnunet-c902a0d224198a36ad3bc07a39fb6cad46cb84e3.tar.gz
gnunet-c902a0d224198a36ad3bc07a39fb6cad46cb84e3.zip
make clang shut up about #5573
Diffstat (limited to 'src')
-rw-r--r--src/include/gnunet_common.h1
-rw-r--r--src/util/dnsparser.c7
2 files changed, 8 insertions, 0 deletions
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"
119 */ 119 */
120#define GNUNET_VA_ARG_ENUM(va,X) ((enum X) va_arg (va, int)) 120#define GNUNET_VA_ARG_ENUM(va,X) ((enum X) va_arg (va, int))
121 121
122
122/** 123/**
123 * @ingroup logging 124 * @ingroup logging
124 * define #GNUNET_EXTRA_LOGGING if using this header outside the GNUnet source 125 * 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,
1088{ 1088{
1089 struct GNUNET_TUN_DnsCertRecord dcert; 1089 struct GNUNET_TUN_DnsCertRecord dcert;
1090 1090
1091#ifdef __clang__
1092#pragma clang diagnostic push
1093#pragma clang diagnostic ignored "-Wtautological-constant-out-of-range-compare"
1094#endif
1091 if ( (cert->cert_type > UINT16_MAX) || 1095 if ( (cert->cert_type > UINT16_MAX) ||
1092 (cert->algorithm > UINT8_MAX) ) 1096 (cert->algorithm > UINT8_MAX) )
1093 { 1097 {
1094 GNUNET_break (0); 1098 GNUNET_break (0);
1095 return GNUNET_SYSERR; 1099 return GNUNET_SYSERR;
1096 } 1100 }
1101#ifdef __clang__
1102#pragma clang diagnostic pop
1103#endif
1097 if (*off + sizeof (struct GNUNET_TUN_DnsCertRecord) + cert->certificate_size > dst_len) 1104 if (*off + sizeof (struct GNUNET_TUN_DnsCertRecord) + cert->certificate_size > dst_len)
1098 return GNUNET_NO; 1105 return GNUNET_NO;
1099 dcert.cert_type = htons ((uint16_t) cert->cert_type); 1106 dcert.cert_type = htons ((uint16_t) cert->cert_type);