[ruby/digest] Suppress false stringop-overread warning
https://github.com/ruby/digest/commit/0df846e8c1
This commit is contained in:
parent
277bcb717b
commit
85198262a3
@ -232,8 +232,14 @@ void SHA1_Update(SHA1_CTX *context, const uint8_t *data, size_t len)
|
|||||||
if ((j + len) > 63) {
|
if ((j + len) > 63) {
|
||||||
(void)memcpy(&context->buffer[j], data, (i = 64-j));
|
(void)memcpy(&context->buffer[j], data, (i = 64-j));
|
||||||
SHA1_Transform(context->state, context->buffer);
|
SHA1_Transform(context->state, context->buffer);
|
||||||
for ( ; i + 63 < len; i += 64)
|
for ( ; i + 63 < len; i += 64) {
|
||||||
|
RB_DIGEST_WARNING_PUSH();
|
||||||
|
#if defined(__GNUC__) && !defined(__clang__)
|
||||||
|
RB_DIGEST_WARNING_IGNORED(-Wstringop-overread);
|
||||||
|
#endif
|
||||||
SHA1_Transform(context->state, &data[i]);
|
SHA1_Transform(context->state, &data[i]);
|
||||||
|
RB_DIGEST_WARNING_POP();
|
||||||
|
}
|
||||||
j = 0;
|
j = 0;
|
||||||
} else {
|
} else {
|
||||||
i = 0;
|
i = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user