From 65fb1ca5ee6ce90051ee15f616d2fde8ebb0ae97 Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Wed, 21 Oct 2015 10:08:49 +0200 Subject: [PATCH] Fixing compiler warnings/errors --- src/gwin/gwin.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c index 5879e895..07beb996 100644 --- a/src/gwin/gwin.c +++ b/src/gwin/gwin.c @@ -36,6 +36,18 @@ static color_t defaultBgColor = Black; static font_t defaultFont; #endif +/* These init functions are defined by each module but not published */ +extern void _gwmInit(void); +extern void _gwmDeinit(void); +#if GWIN_NEED_WIDGET + extern void _gwidgetInit(void); + extern void _gwidgetDeinit(void); +#endif +#if GWIN_NEED_CONTAINERS + extern void _gcontainerInit(void); + extern void _gcontainerDeinit(void); +#endif + /*----------------------------------------------- * Helper Routines *-----------------------------------------------*/ @@ -46,33 +58,24 @@ static color_t defaultBgColor = Black; void _gwinInit(void) { - extern void _gwmInit(void); - _gwmInit(); - #if GWIN_NEED_WIDGET - extern void _gwidgetInit(void); + #if GWIN_NEED_WIDGET _gwidgetInit(); #endif - #if GWIN_NEED_CONTAINERS - extern void _gcontainerInit(void); + #if GWIN_NEED_CONTAINERS _gcontainerInit(); #endif } void _gwinDeinit(void) { - extern void _gwmDeinit(void); - #if GWIN_NEED_CONTAINERS - extern void _gcontainerDeinit(void); - _gcontainerDeinit(); #endif - #if GWIN_NEED_WIDGET - extern void _gwidgetDeinit(void); + #if GWIN_NEED_WIDGET _gwidgetDeinit(); #endif