ciaa / firmware_v1

Firmware de la CIAA
http://www.proyecto-ciaa.com.ar
129 stars 120 forks source link

INLINE defined and redefined during building #437

Closed mabeett closed 1 year ago

mabeett commented 8 years ago

In the current master (6ffe13f) when building (for example) blinking example the compiler warnings advert about INLINE macro redefinitions.

In file included from ./modules/rtos/inc/Types.h:52:0,
                 from ./modules/rtos/inc/os.h:55,
                 from ./modules/drivers/cortexM4/lpc43xx/lpc4337/src/ciaaDriverAio.c:53:
./modules/rtos/inc/Compiler.h:81:0: warning: "INLINE" redefined
 #define INLINE
 ^
In file included from ./externals/drivers/cortexM4/lpc43xx/inc/cmsis.h:32:0,
                 from ./externals/drivers/cortexM4/lpc43xx/inc/chip.h:33,
                 from ./modules/drivers/cortexM4/lpc43xx/lpc4337/src/ciaaDriverAio.c:52:
./externals/drivers/cortexM4/lpc43xx/inc/lpc_types.h:205:0: note: this is the location of the previous definition
 #define INLINE inline
 ^
(...)
In file included from ./modules/rtos/inc/Types.h:52:0,
                 from ./modules/rtos/inc/os.h:55,
                 from ./modules/drivers/cortexM4/lpc43xx/lpc4337/src/ciaaDriverUart.c:53:
./modules/rtos/inc/Compiler.h:81:0: warning: "INLINE" redefined
 #define INLINE
 ^
In file included from ./externals/drivers/cortexM4/lpc43xx/inc/cmsis.h:32:0,
                 from ./externals/drivers/cortexM4/lpc43xx/inc/chip.h:33,
                 from ./modules/drivers/cortexM4/lpc43xx/lpc4337/src/ciaaDriverUart.c:52:
./externals/drivers/cortexM4/lpc43xx/inc/lpc_types.h:205:0: note: this is the location of the previous definition
 #define INLINE inline
 ^
 (...)
In file included from ./externals/drivers/cortexM4/lpc43xx/inc/cmsis.h:32:0,
                 from ./externals/drivers/cortexM4/lpc43xx/inc/chip.h:33,
                 from ./out/gen/src/cortexM4/Os_Internal_Arch_Cfg.c:59:
./externals/drivers/cortexM4/lpc43xx/inc/lpc_types.h:205:0: warning: "INLINE" redefined
 #define INLINE inline
 ^
In file included from ./modules/rtos/inc/os.h:55:0,
                 from ./modules/rtos/inc/Os_Internal.h:54,
                 from ./out/gen/src/cortexM4/Os_Internal_Arch_Cfg.c:54:
./modules/rtos/inc/Types.h:97:0: note: this is the location of the previous definition
 #define INLINE
 ^
mcerdeiro commented 8 years ago

I think that the rtos does not use this macro so we can remove it. I have to check it but I am almost sure about that. :) Am 13.07.2016 3:47 PM schrieb "MAbeeTT (Matías Pecchia)" < notifications@github.com>:

In the current master (6ffe13f) when building (for example) blinking example the compiler warnings advert about INLINE macro redefinitions.

In file included from ./modules/rtos/inc/Types.h:52:0, from ./modules/rtos/inc/os.h:55, from ./modules/drivers/cortexM4/lpc43xx/lpc4337/src/ciaaDriverAio.c:53: ./modules/rtos/inc/Compiler.h:81:0: warning: "INLINE" redefined

define INLINE

^ In file included from ./externals/drivers/cortexM4/lpc43xx/inc/cmsis.h:32:0, from ./externals/drivers/cortexM4/lpc43xx/inc/chip.h:33, from ./modules/drivers/cortexM4/lpc43xx/lpc4337/src/ciaaDriverAio.c:52: ./externals/drivers/cortexM4/lpc43xx/inc/lpc_types.h:205:0: note: this is the location of the previous definition

define INLINE inline

^ (...) In file included from ./modules/rtos/inc/Types.h:52:0, from ./modules/rtos/inc/os.h:55, from ./modules/drivers/cortexM4/lpc43xx/lpc4337/src/ciaaDriverUart.c:53: ./modules/rtos/inc/Compiler.h:81:0: warning: "INLINE" redefined

define INLINE

^ In file included from ./externals/drivers/cortexM4/lpc43xx/inc/cmsis.h:32:0, from ./externals/drivers/cortexM4/lpc43xx/inc/chip.h:33, from ./modules/drivers/cortexM4/lpc43xx/lpc4337/src/ciaaDriverUart.c:52: ./externals/drivers/cortexM4/lpc43xx/inc/lpc_types.h:205:0: note: this is the location of the previous definition

define INLINE inline

^ (...) In file included from ./externals/drivers/cortexM4/lpc43xx/inc/cmsis.h:32:0, from ./externals/drivers/cortexM4/lpc43xx/inc/chip.h:33, from ./out/gen/src/cortexM4/Os_Internal_Arch_Cfg.c:59: ./externals/drivers/cortexM4/lpc43xx/inc/lpc_types.h:205:0: warning: "INLINE" redefined

define INLINE inline

^ In file included from ./modules/rtos/inc/os.h:55:0, from ./modules/rtos/inc/Os_Internal.h:54, from ./out/gen/src/cortexM4/Os_Internal_Arch_Cfg.c:54: ./modules/rtos/inc/Types.h:97:0: note: this is the location of the previous definition

define INLINE

^

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ciaa/Firmware/issues/437, or mute the thread https://github.com/notifications/unsubscribe/AG7kmyEJyLKCu59yTmTOyv3ArrVzZ-mIks5qVOyHgaJpZM4JLb1V .

jcecconi commented 8 years ago

It is defined in "inc/Compiler.h" and "inc/Types.h" , maybe We can use a conditional #ifndef or remove it.

mabeett commented 8 years ago

Sincerely I don´t know the context of the code causing the warnings. If you want say me which surgery will be appropriate and I may elaborate and propose it as Pull Request.

I am searching for builds free of compiler warning messages, so the user might be able of pay attention to his own code warnings.