diff options
| author | Petteri.Aimonen <Petteri.Aimonen@gmail.com> | 2012-02-27 16:44:21 +0000 |
|---|---|---|
| committer | Petteri.Aimonen <Petteri.Aimonen@gmail.com> | 2012-02-27 16:44:21 +0000 |
| commit | 91c542247268b77a945ee463ee2f73a119ea76a6 (patch) | |
| tree | 20a93b5d05bd0369057b8081c72d9822a9464fb1 | |
| parent | 90973e833d69a93525ef2c4eb5ab687ee13342df (diff) | |
| download | libfixmath-91c542247268b77a945ee463ee2f73a119ea76a6.tar.gz | |
Fix useless warning on AVR
| -rw-r--r-- | libfixmath/fix16.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libfixmath/fix16.h b/libfixmath/fix16.h index 31d7e00..a0de247 100644 --- a/libfixmath/fix16.h +++ b/libfixmath/fix16.h @@ -11,7 +11,12 @@ extern "C" */
#ifndef FIXMATH_FUNC_ATTRS
# ifdef __GNUC__
-# define FIXMATH_FUNC_ATTRS __attribute__((leaf, nothrow, pure))
+# ifdef AVR
+ // avr-gcc uselessly warns about "leaf".
+# define FIXMATH_FUNC_ATTRS __attribute__((nothrow, pure))
+# else
+# define FIXMATH_FUNC_ATTRS __attribute__((leaf, nothrow, pure))
+# endif
# else
# define FIXMATH_FUNC_ATTRS
# endif
|
