diff --git a/flight/CopterControl/System/coptercontrol.c b/flight/CopterControl/System/coptercontrol.c index 821406f9e..4e8837ed8 100644 --- a/flight/CopterControl/System/coptercontrol.c +++ b/flight/CopterControl/System/coptercontrol.c @@ -77,7 +77,7 @@ int main() #endif /* Initialize modules */ - MODULE_INITIALISE_ALL(); + MODULE_INITIALISE_ALL return 0; } diff --git a/flight/Modules/System/systemmod.c b/flight/Modules/System/systemmod.c index b9deb8590..ce0d61444 100644 --- a/flight/Modules/System/systemmod.c +++ b/flight/Modules/System/systemmod.c @@ -120,7 +120,7 @@ static void systemTask(void *parameters) portTickType lastSysTime; /* create all modules thread */ - MODULE_TASKCREATE_ALL(); + MODULE_TASKCREATE_ALL // Initialize vars idleCounter = 0; diff --git a/flight/OpenPilot/System/openpilot.c b/flight/OpenPilot/System/openpilot.c index 4866c4d8e..ec3aae5f8 100644 --- a/flight/OpenPilot/System/openpilot.c +++ b/flight/OpenPilot/System/openpilot.c @@ -92,7 +92,7 @@ int main() PIOS_Board_Init(); /* Initialize modules */ - MODULE_INITIALISE_ALL(); + MODULE_INITIALISE_ALL #if INCLUDE_TEST_TASKS /* Create test tasks */ diff --git a/flight/PiOS.posix/inc/pios_initcall.h b/flight/PiOS.posix/inc/pios_initcall.h index c83b6d77c..eacbbeaab 100644 --- a/flight/PiOS.posix/inc/pios_initcall.h +++ b/flight/PiOS.posix/inc/pios_initcall.h @@ -41,9 +41,9 @@ #define UAVOBJ_INITCALL(fn) #define MODULE_INITCALL(ifn, iparam, sfn, sparam, flags) -#define MODULE_TASKCREATE_ALL(); +#define MODULE_TASKCREATE_ALL -#define MODULE_INITIALISE_ALL(); \ +#define MODULE_INITIALISE_ALL { \ /* Initialize modules */ \ InitModules(); \ /* Start the FreeRTOS scheduler which never returns.*/ \ @@ -56,7 +56,7 @@ PIOS_LED_Toggle(LED1); \ PIOS_LED_Toggle(LED2); \ PIOS_DELAY_WaitmS(100); \ - } + }; } #endif /* PIOS_INITCALL_H */ diff --git a/flight/PiOS.win32/inc/pios_initcall.h b/flight/PiOS.win32/inc/pios_initcall.h index aebf64b29..a71f64e03 100644 --- a/flight/PiOS.win32/inc/pios_initcall.h +++ b/flight/PiOS.win32/inc/pios_initcall.h @@ -41,9 +41,9 @@ #define UAVOBJ_INITCALL(fn) #define MODULE_INITCALL(ifn, iparam, sfn, sparam, flags) -#define MODULE_TASKCREATE_ALL(); +#define MODULE_TASKCREATE_ALL -#define MODULE_INITIALISE_ALL(); \ +#define MODULE_INITIALISE_ALL { \ /* Initialize modules */ \ InitModules(); \ /* Start the FreeRTOS scheduler which never returns.*/ \ @@ -56,7 +56,7 @@ PIOS_LED_Toggle(LED1); \ PIOS_LED_Toggle(LED2); \ PIOS_DELAY_WaitmS(100); \ - } + }; } #endif /* PIOS_INITCALL_H */ diff --git a/flight/PiOS/inc/pios_initcall.h b/flight/PiOS/inc/pios_initcall.h index 3c71d892d..06c8b2ec0 100644 --- a/flight/PiOS/inc/pios_initcall.h +++ b/flight/PiOS/inc/pios_initcall.h @@ -76,7 +76,7 @@ extern initmodule_t __module_initcall_start[], __module_initcall_end[]; #define UAVOBJ_INITCALL(fn) __define_initcall("uavobj",fn,1) #define MODULE_INITCALL(ifn, iparam, sfn, sparam, flags) __define_module_initcall("module", ifn, iparam, sfn, sparam, flags) -#define MODULE_INITIALISE_ALL(); for (initmodule_t *fn = __module_initcall_start; fn < __module_initcall_end; fn++) \ +#define MODULE_INITIALISE_ALL { for (initmodule_t *fn = __module_initcall_start; fn < __module_initcall_end; fn++) \ if (fn->fn_minit && ( (fn->flag & MODULE_EXEC_FIRST_FLAG) == MODULE_EXEC_FIRST_FLAG) ) \ (fn->fn_minit)(); \ for (initmodule_t *fn = __module_initcall_start; fn < __module_initcall_end; fn++) \ @@ -84,11 +84,11 @@ extern initmodule_t __module_initcall_start[], __module_initcall_end[]; (fn->fn_minit)(); \ for (initmodule_t *fn = __module_initcall_start; fn < __module_initcall_end; fn++) \ if (fn->fn_minit && ( (fn->flag & MODULE_EXEC_LAST_FLAG) == MODULE_EXEC_LAST_FLAG) ) \ - (fn->fn_minit)(); + (fn->fn_minit)(); } -#define MODULE_TASKCREATE_ALL(); for (initmodule_t *fn = __module_initcall_start; fn < __module_initcall_end; fn++) \ +#define MODULE_TASKCREATE_ALL { for (initmodule_t *fn = __module_initcall_start; fn < __module_initcall_end; fn++) \ if (fn->fn_tinit) \ - (fn->fn_tinit)(); + (fn->fn_tinit)(); } #endif /* PIOS_INITCALL_H */