Fix '-Werror=shift-negative-value' for gcc 6
GCC 6 introduced warning for shift on negative value numbers. When F16C is called with a negative number it evaluates FIXMATH_COMBINE_I_M with both the positive and the negative value. Fixes #3
This commit is contained in:
parent
6928e2f76d
commit
f8596fbada
|
@ -307,7 +307,7 @@ extern fix16_t fix16_from_str(const char *buf);
|
|||
( \
|
||||
(( #i[0] ) == '-') \
|
||||
? -FIXMATH_COMBINE_I_M((unsigned)( ( (i) * -1) ), m) \
|
||||
: FIXMATH_COMBINE_I_M(i, m) \
|
||||
: FIXMATH_COMBINE_I_M((unsigned)i, m) \
|
||||
) \
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue