Skip to content

Commit c3bd209

Browse files
shlomowgalak
authored andcommitted
DSP: fix compiler warning on inline attribute
When trying to compile the distance test on zephyr, The compiler reports: "warning: 'inline' attribute directive ignored". To fix this, we use `static inline` explicitly instead on using the `attribute` flag. In addition, to force inline we use the attribute `always_inline`. Signed-off-by: Shlomi Vaknin <[email protected]>
1 parent 473b664 commit c3bd209

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMSIS/DSP/Include/arm_math.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,8 @@ extern "C"
381381
#elif defined (__GNUC_PYTHON__)
382382
#include <stdint.h>
383383
#define __ALIGNED(x) __attribute__((aligned(x)))
384-
#define __STATIC_FORCEINLINE static __attribute__((inline))
385-
#define __STATIC_INLINE static __attribute__((inline))
384+
#define __STATIC_FORCEINLINE static inline __attribute__((always_inline))
385+
#define __STATIC_INLINE static inline
386386
#pragma GCC diagnostic ignored "-Wunused-function"
387387
#pragma GCC diagnostic ignored "-Wattributes"
388388

0 commit comments

Comments
 (0)