From 20a5926d2e0fe2cf7c5508f490ae04d61bfd07a4 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 17 Feb 2007 21:54:17 +0000 Subject: build with -Wundef to make sure we have spelled the defines right in #if lines and have the proper includes included etc git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12360 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libfaad/common.h | 20 ++++++++++---------- apps/debug_menu.c | 3 --- apps/dsp.c | 3 ++- apps/gui/list.c | 2 +- apps/screen_access.c | 2 +- apps/screen_access.h | 2 +- firmware/target/arm/usb-pp.c | 2 +- tools/configure | 2 +- 8 files changed, 17 insertions(+), 19 deletions(-) diff --git a/apps/codecs/libfaad/common.h b/apps/codecs/libfaad/common.h index 65d27338ae..59d96252e5 100644 --- a/apps/codecs/libfaad/common.h +++ b/apps/codecs/libfaad/common.h @@ -181,33 +181,33 @@ typedef float float32_t; #else #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H) # include # endif //# include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H //# include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include #else -# if HAVE_STDINT_H +# ifdef HAVE_STDINT_H # include # else /* we need these... */ @@ -221,7 +221,7 @@ typedef short int16_t; typedef char int8_t; # endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H # include #endif diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 98cbf13860..95b9aa8f01 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -944,9 +944,6 @@ static bool dbg_spdif(void) #elif CONFIG_KEYPAD == ONDIO_PAD # define DEBUG_CANCEL BUTTON_MENU -#elif CONFIG_KEYPAD == GMINI100_PAD -# define DEBUG_CANCEL BUTTON_OFF - #elif (CONFIG_KEYPAD == IPOD_3G_PAD) || \ (CONFIG_KEYPAD == IPOD_4G_PAD) # define DEBUG_CANCEL BUTTON_MENU diff --git a/apps/dsp.c b/apps/dsp.c index 02e231d800..7ecb791f50 100644 --- a/apps/dsp.c +++ b/apps/dsp.c @@ -16,10 +16,11 @@ * KIND, either express or implied. * ****************************************************************************/ +#include "config.h" + #include #include #include -#include "config.h" #include "dsp.h" #include "eq.h" #include "kernel.h" diff --git a/apps/gui/list.c b/apps/gui/list.c index 6d966c23ae..67b34e5d95 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c @@ -812,7 +812,7 @@ unsigned gui_synclist_do_button(struct gui_synclist * lists, gui_synclist_draw(lists); yield(); return ACTION_STD_PREV; -#if (REMOTE_BUTTON != 0 ) +#ifdef REMOTE_BUTTON case ACTION_LISTTREE_RC_PGUP: gui_synclist_select_previous_page(lists, SCREEN_REMOTE); gui_synclist_draw(lists); diff --git a/apps/screen_access.c b/apps/screen_access.c index b784637308..e2714b2324 100644 --- a/apps/screen_access.c +++ b/apps/screen_access.c @@ -140,7 +140,7 @@ void screen_init(struct screen * screen, enum screen_type screen_type) screen->transparent_bitmap=&lcd_bitmap_transparent; screen->transparent_bitmap_part=&lcd_bitmap_transparent_part; #endif -#if defined(HAVE_LCD_COLOR) && LCD_REMOTE_DEPTH > 1 +#if defined(HAVE_LCD_COLOR) && defined(LCD_REMOTE_DEPTH) && LCD_REMOTE_DEPTH > 1 screen->color_to_native=&lcd_color_to_native; #endif screen->get_background=&lcd_get_background; diff --git a/apps/screen_access.h b/apps/screen_access.h index cf74a97ba1..eea15e86a5 100644 --- a/apps/screen_access.h +++ b/apps/screen_access.h @@ -93,7 +93,7 @@ struct screen void (*transparent_bitmap_part)(const fb_data *src, int src_x, int src_y, int stride, int x, int y, int width, int height); void (*set_drawmode)(int mode); -#if defined(HAVE_LCD_COLOR) && LCD_REMOTE_DEPTH > 1 +#if defined(HAVE_LCD_COLOR) && defined(LCD_REMOTE_DEPTH) && LCD_REMOTE_DEPTH > 1 unsigned (*color_to_native)(unsigned color); #endif #if (LCD_DEPTH > 1) || (LCD_REMOTE_DEPTH > 1) diff --git a/firmware/target/arm/usb-pp.c b/firmware/target/arm/usb-pp.c index d69c6e6c9c..b497e86804 100644 --- a/firmware/target/arm/usb-pp.c +++ b/firmware/target/arm/usb-pp.c @@ -96,7 +96,7 @@ void usb_enable(bool on) handling, which should be the same for all PortalPlayer targets. */ if (on) { -#if IPOD_ARCH || defined(IRIVER_H10) || defined (IRIVER_H10_5GB) +#if defined(IPOD_ARCH) || defined(IRIVER_H10) || defined (IRIVER_H10_5GB) /* For the H10 and iPod, we can only do one thing with USB mode - reboot into the flash-based disk-mode. This does not return. */ diff --git a/tools/configure b/tools/configure index 77884ef02c..f2626492fb 100755 --- a/tools/configure +++ b/tools/configure @@ -9,7 +9,7 @@ # # global CC options for all platforms -CCOPTS="-W -Wall -O -nostdlib -ffreestanding -Wstrict-prototypes" +CCOPTS="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes" use_logf="#undef ROCKBOX_HAS_LOGF" use_simsound="#undef ROCKBOX_HAS_SIMSOUND" -- cgit v1.2.3