From 0a55fc94bd67836675e414f43a0f72701c53c39c Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Thu, 26 Aug 2021 14:26:04 +0200 Subject: [PATCH] Avoid duplicate const specifier compiler warnings The original code is perfectly valid standard C. However, some compilers (especially GCC) complain about duplicate const specifiers anyway. At this point we cave in as there doesn't seem to be any efforts to fix this problem by the corresponding compiler vendors. uGFX v3 will no longer suffer from this problem as the driver interface works differently in this area. --- src/gdisp/gdisp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gdisp/gdisp.c b/src/gdisp/gdisp.c index 394b70b7..629273c4 100644 --- a/src/gdisp/gdisp.c +++ b/src/gdisp/gdisp.c @@ -569,9 +569,9 @@ void _gdispInit(void) #if defined(GDISP_DRIVER_LIST) { unsigned i; - typedef const GDISPVMT const GDISPVMTLIST[1]; + typedef const GDISPVMT GDISPVMTLIST[1]; - static const GDISPVMT * const dclist[] = {GDISP_DRIVER_LIST}; + static const GDISPVMT* dclist[] = { GDISP_DRIVER_LIST }; for(i = 0; i < sizeof(dclist)/sizeof(dclist[0]); i++) { if (!(dclist[i]->d.flags & GDISP_VFLG_DYNAMICONLY))