You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling CMSIS-DSP using GCC 10.3, the compiler produces the following warning in arm_divide_q15():
[build] Source/FastMathFunctions/arm_divide_q15.c: In function'arm_divide_q15':
[build] Source/FastMathFunctions/arm_divide_q15.c:77:21: error: overflow in conversion from 'int' to 'q15_t' {aka 'short int'} changes value from '32768' to '-32768' [-Werror=overflow]
[build] 77 |*quotient = 0x8000;
[build] | ^~~~~~
0x8000 represents the positive integer 32768, but what was actually intended by the writer is the two's complement representation of -32768. Replacing 0x8000 with -32768 resolves the compiler warning and avoids further ambiguity.
The text was updated successfully, but these errors were encountered:
When compiling CMSIS-DSP using GCC 10.3, the compiler produces the following warning in
arm_divide_q15()
:0x8000
represents the positive integer32768
, but what was actually intended by the writer is the two's complement representation of-32768
. Replacing0x8000
with-32768
resolves the compiler warning and avoids further ambiguity.The text was updated successfully, but these errors were encountered: