1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

internal/bits.h: Suppress "uninitialized variable"

Coverity Scan says "Using uninitialized value c.fixnum when calling
__builtin_mul_overflow_p."
This commit is contained in:
Yusuke Endoh 2020-04-09 09:38:57 +09:00
parent 1a4f33e84e
commit 9af3469b84

View file

@ -112,7 +112,7 @@
/* and GCC permits bitfields for integers other than int */
# define MUL_OVERFLOW_FIXNUM_P(a, b) \
__extension__ ({ \
struct { long fixnum : sizeof(long) * CHAR_BIT - 1; } c; \
struct { long fixnum : sizeof(long) * CHAR_BIT - 1; } c = { 0 }; \
__builtin_mul_overflow_p((a), (b), c.fixnum); \
})
#else