From 6450bc5d51cf02b42fe910f313e62155a2bf5e11 Mon Sep 17 00:00:00 2001 From: lottaviano Date: Tue, 1 Sep 2009 16:09:17 +0000 Subject: [PATCH] Add macros to help filtering output for long to fix warnings. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2850 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/gui/menu.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bertos/gui/menu.c b/bertos/gui/menu.c index 6874e3c4..e689ff96 100644 --- a/bertos/gui/menu.c +++ b/bertos/gui/menu.c @@ -42,6 +42,7 @@ #include "menu.h" #include "cfg/cfg_gfx.h" +#include "cfg/cfg_arch.h" #include #include @@ -276,7 +277,10 @@ static void menu_layout( if (!(item->flags & MIF_HIDDEN)) { /* Check if a special render function is supplied, otherwise use defaults */ - RenderHook renderhook = (item->flags & MIF_RENDERHOOK) ? (RenderHook)item->label : menu_defaultRenderHook; + #if (ARCH & ARCH_NIGHTTEST) + #warning __FILTER_NEXT_WARNING__ + #endif + RenderHook renderhook = (item->flags & MIF_RENDERHOOK) ? CONST_CAST(RenderHook, item->label) : menu_defaultRenderHook; /* Render menuitem */ renderhook(menu->bitmap, ypos++, (i == selected), item); @@ -538,6 +542,9 @@ iptr_t menu_handle(const struct Menu *menu) /* Store currently selected item before leaving. */ if (menu->flags & MF_SAVESEL) + #if (ARCH & ARCH_NIGHTTEST) + #warning __FILTER_NEXT_WARNING__ + #endif CONST_CAST(struct Menu *, menu)->selected = selected; return result; -- 2.25.1