← Commit list

716dc8ce6c

Viktor Szakats
Viktor Szakats
2026-03-09
SUCCESS Duration: 249s

Subject

rand: drop scan-build silencer

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/rand.c+0 -6
@@ -206,12 +206,6 @@ CURLcode Curl_rand_hex(struct Curl_easy *data, unsigned char *rnd, size_t num)
unsigned char buffer[128];
DEBUGASSERT(num > 1);
-#ifdef __clang_analyzer__
- /* This silences a scan-build warning about accessing this buffer with
- uninitialized memory. */
- memset(buffer, 0, sizeof(buffer));
-#endif
-
if((num / 2 >= sizeof(buffer)) || !(num & 1)) {
/* make sure it fits in the local buffer and that it is an odd number! */
DEBUGF(infof(data, "invalid buffer size with Curl_rand_hex"));