summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/misc.c8
-rw-r--r--tools/checkwps/checkwps.make2
2 files changed, 5 insertions, 5 deletions
diff --git a/apps/misc.c b/apps/misc.c
index 31f0ac4..91be53b 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -929,14 +929,13 @@ int hex_to_rgb(const char* hex, int* color)
#ifdef HAVE_LCD_BITMAP
/* '0'-'3' are ASCII 0x30 to 0x33 */
#define is0123(x) (((x) & 0xfc) == 0x30)
-
+#if !defined(__PCTOOL__) || defined(CHECKWPS)
bool parse_color(enum screen_type screen, char *text, int *value)
{
(void)text; (void)value; /* silence warnings on mono bitmap */
- int depth = screens[screen].depth;
#ifdef HAVE_LCD_COLOR
- if (depth > 2)
+ if (screens[screen].depth > 2)
{
if (hex_to_rgb(text, value) < 0)
return false;
@@ -946,7 +945,7 @@ bool parse_color(enum screen_type screen, char *text, int *value)
#endif
#if LCD_DEPTH == 2 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH == 2)
- if (depth == 2)
+ if (screens[screen].depth == 2)
{
if (text[1] != '\0' || !is0123(*text))
return false;
@@ -956,6 +955,7 @@ bool parse_color(enum screen_type screen, char *text, int *value)
#endif
return false;
}
+#endif /* !defined(__PCTOOL__) || defined(CHECKWPS) */
/* only used in USB HID and set_time screen */
#if defined(USB_ENABLE_HID) || (CONFIG_RTC != 0)
diff --git a/tools/checkwps/checkwps.make b/tools/checkwps/checkwps.make
index e09ce25..e84452d 100644
--- a/tools/checkwps/checkwps.make
+++ b/tools/checkwps/checkwps.make
@@ -7,7 +7,7 @@
# $Id$
#
-FLAGS=-g -D__PCTOOL__ $(TARGET) -Wall
+FLAGS=-g -D__PCTOOL__ $(TARGET) -Wall -DCHECKWPS
SRC= $(call preprocess, $(TOOLSDIR)/checkwps/SOURCES)