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:
Gaëtan Harter 2017-09-28 17:03:01 +02:00
parent 6928e2f76d
commit f8596fbada
1 changed files with 1 additions and 1 deletions

View File

@ -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) \
) \
)