I ran into a minor problem with the declaration of events. Declared with a #define, a compiler warning emerges which requires -fpermissive to clear. I noticed chEvtObjectInit() uses a different cast "event_listerner_t " versus "void ".
This patch against trunk removes the compiler warning and also makes both ways to initialize the object consistent.
Index: os/rt/include/chevents.h =================================================================== --- os/rt/include/chevents.h (revision 10325) +++ os/rt/include/chevents.h (working copy) @@ -102,7 +102,7 @@ * source that is part of a bigger structure. * @param name the name of the event source variable */ -#define _EVENTSOURCE_DATA(name) {(void *)(&name)} +#define _EVENTSOURCE_DATA(name) {(event_listener_t *)(&name)} /** * @brief Static event source initializer.
Fixed in trunk, 17.6.1 and 16.1.9.
Thanks,
Giovanni