math32: Integer overflow occurs in arithmetic on constant operands

https://coverity.pt.xiaomi.com/#/project-view/10098/10010?selectedIssue=1266083

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
zhangyuan29 2024-07-12 15:21:51 +08:00 committed by Xiang Xiao
parent 7fc03e0084
commit fc5e37e57b

View File

@ -133,9 +133,9 @@ extern "C"
# define __umul64_const(res, m, n, bias) \
do \
{ \
uint32_t __m_lo = (m); \
uint32_t __m_lo = (m) & 0xffffffff; \
uint32_t __m_hi = (m) >> 32; \
uint32_t __n_lo = (n); \
uint32_t __n_lo = (n) & 0xffffffff; \
uint32_t __n_hi = (n) >> 32; \
uint32_t __res_lo; \
uint32_t __res_hi; \