mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:21:41 +03:00
rand: drop scan-build silencer
scan-build has been dropped in favor of clang-tidy and this false positive no longer triggers with it. Follow-up toce4db9c2ef#20751 Follow-up to02f207a76bCloses #20860
This commit is contained in:
parent
05189f5549
commit
716dc8ce6c
1 changed files with 0 additions and 6 deletions
|
|
@ -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"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue