From 58f6e0452eb77a6c51663b5cc2b443d355303cff Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Mon, 2 Nov 2015 12:24:13 +0100 Subject: [PATCH] Fixing compiler warnings --- src/gdisp/gdisp.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/gdisp/gdisp.c b/src/gdisp/gdisp.c index 16d605cb..33512f61 100644 --- a/src/gdisp/gdisp.c +++ b/src/gdisp/gdisp.c @@ -3248,7 +3248,12 @@ void gdispGDrawBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, co } void gdispGDrawStringBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, const char* str, font_t font, color_t color, justify_t justify) { + #if GDISP_NEED_TEXT_WORDWRAP + wrapParameters_t wrapParameters; + #endif + MUTEX_ENTER(g); + g->t.font = font; g->t.clipx0 = x; g->t.clipy0 = y; @@ -3272,7 +3277,6 @@ void gdispGDrawBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, co /* Render */ #if GDISP_NEED_TEXT_WORDWRAP - wrapParameters_t wrapParameters; wrapParameters.x = x; wrapParameters.y = y; wrapParameters.font = font; @@ -3289,7 +3293,12 @@ void gdispGDrawBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, co } void gdispGFillStringBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, const char* str, font_t font, color_t color, color_t bgcolor, justify_t justify) { + #if GDISP_NEED_TEXT_WORDWRAP + wrapParameters_t wrapParameters; + #endif + MUTEX_ENTER(g); + g->p.cx = cx; g->p.cy = cy; g->t.font = font; @@ -3321,7 +3330,6 @@ void gdispGDrawBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, co /* Render */ #if GDISP_NEED_TEXT_WORDWRAP - wrapParameters_t wrapParameters; wrapParameters.x = x; wrapParameters.y = y; wrapParameters.font = font;