summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-10-27 15:57:31 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-10-27 15:59:44 +0200
commit75b94d77e8daedbe56249abfd2652cbbfcd08958 (patch)
tree01ba87e8bbda520ecfdbfde7c0f0e0e7dd67910c
parenta669e069460b4068647e9646377b4a1990c4bb13 (diff)
downloadcurl-75b94d77e8daedbe56249abfd2652cbbfcd08958.tar.gz
rand: add comment to skip a clang-tidy false positive
-rw-r--r--lib/rand.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/rand.c b/lib/rand.c
index 1dc2504ac..6ee45feb1 100644
--- a/lib/rand.c
+++ b/lib/rand.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -174,6 +174,8 @@ CURLcode Curl_rand_hex(struct Curl_easy *data, unsigned char *rnd,
return result;
while(num) {
+ /* clang-tidy warns on this line without this comment: */
+ /* NOLINTNEXTLINE(clang-analyzer-core.UndefinedBinaryOperatorResult) */
*rnd++ = hex[(*bufp & 0xF0)>>4];
*rnd++ = hex[*bufp & 0x0F];
bufp++;