Explicilty set CONFIG_ defines to 0 which are not used.. because doing

#if defined(BLAA) && BLAA == something defeats the point of Wundef


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12378 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2007-02-18 02:04:47 +00:00
parent 1083de8e7d
commit 8ff3a653bd
9 changed files with 24 additions and 18 deletions

View file

@ -72,7 +72,7 @@ recorder/backdrop.c
gui/color_picker.c gui/color_picker.c
#endif #endif
#endif #endif
#ifdef CONFIG_TUNER #if CONFIG_TUNER
recorder/radio.c recorder/radio.c
#endif #endif
#ifdef HAVE_RECORDING #ifdef HAVE_RECORDING

View file

@ -60,7 +60,7 @@
#ifdef HAVE_MMC #ifdef HAVE_MMC
#include "ata_mmc.h" #include "ata_mmc.h"
#endif #endif
#ifdef CONFIG_TUNER #if CONFIG_TUNER
#include "tuner.h" #include "tuner.h"
#include "radio.h" #include "radio.h"
#endif #endif
@ -1986,7 +1986,7 @@ static bool dbg_save_roms(void)
#endif /* CPU */ #endif /* CPU */
#ifndef SIMULATOR #ifndef SIMULATOR
#ifdef CONFIG_TUNER #if CONFIG_TUNER
static bool dbg_fm_radio(void) static bool dbg_fm_radio(void)
{ {
char buf[32]; char buf[32];
@ -2357,7 +2357,7 @@ bool debug_menu(void)
#endif /* PM_DEBUG */ #endif /* PM_DEBUG */
#endif /* HAVE_LCD_BITMAP */ #endif /* HAVE_LCD_BITMAP */
#ifndef SIMULATOR #ifndef SIMULATOR
#ifdef CONFIG_TUNER #if CONFIG_TUNER
{ "FM Radio", dbg_fm_radio }, { "FM Radio", dbg_fm_radio },
#endif #endif
#endif #endif

View file

@ -46,7 +46,7 @@
#include "keyboard.h" #include "keyboard.h"
#endif #endif
#ifdef CONFIG_TUNER #if CONFIG_TUNER
#include "radio.h" #include "radio.h"
#endif #endif
@ -288,7 +288,7 @@ int ft_load(struct tree_context* c, const char* tempdir)
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
(*c->dirfilter == SHOW_RWPS && (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_RWPS) || (*c->dirfilter == SHOW_RWPS && (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_RWPS) ||
#endif #endif
#ifdef CONFIG_TUNER #if CONFIG_TUNER
(*c->dirfilter == SHOW_FMR && (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_FMR) || (*c->dirfilter == SHOW_FMR && (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_FMR) ||
#endif #endif
(*c->dirfilter == SHOW_CFG && (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_CFG) || (*c->dirfilter == SHOW_CFG && (dptr->attr & TREE_ATTR_MASK) != TREE_ATTR_CFG) ||
@ -435,7 +435,7 @@ int ft_enter(struct tree_context* c)
} }
break; break;
#ifdef CONFIG_TUNER #if CONFIG_TUNER
/* fmr preset file */ /* fmr preset file */
case TREE_ATTR_FMR: case TREE_ATTR_FMR:

View file

@ -84,7 +84,7 @@
#define SETTINGS_RESET BUTTON_REC #define SETTINGS_RESET BUTTON_REC
#endif #endif
#ifdef CONFIG_TUNER #if CONFIG_TUNER
#include "radio.h" #include "radio.h"
#endif #endif
#ifdef HAVE_MMC #ifdef HAVE_MMC
@ -364,7 +364,7 @@ static void init(void)
audio_preinit(); audio_preinit();
#endif #endif
#ifdef CONFIG_TUNER #if CONFIG_TUNER
radio_init(); radio_init();
#endif #endif

View file

@ -30,7 +30,7 @@
#include "settings_menu.h" #include "settings_menu.h"
#include "exported_menus.h" #include "exported_menus.h"
#include "tree.h" #include "tree.h"
#ifdef CONFIG_TUNER #if CONFIG_TUNER
#include "radio.h" #include "radio.h"
#endif #endif
#ifdef HAVE_RECORDING #ifdef HAVE_RECORDING
@ -386,7 +386,7 @@ MENUITEM_FUNCTION_WPARAM(browse_themes, ID2P(LANG_CUSTOM_THEME),
MENUITEM_FUNCTION_WPARAM(browse_plugins, ID2P(LANG_PLUGINS), MENUITEM_FUNCTION_WPARAM(browse_plugins, ID2P(LANG_PLUGINS),
browse_folder, (void*)&rocks, NULL, bitmap_icons_6x8[Icon_Plugin]); browse_folder, (void*)&rocks, NULL, bitmap_icons_6x8[Icon_Plugin]);
#ifdef CONFIG_TUNER #if CONFIG_TUNER
MENUITEM_FUNCTION(load_radio_screen, ID2P(LANG_FM_RADIO), MENUITEM_FUNCTION(load_radio_screen, ID2P(LANG_FM_RADIO),
(menu_function)radio_screen, dynamicitem_callback, (menu_function)radio_screen, dynamicitem_callback,
bitmap_icons_6x8[Icon_Radio_screen]); bitmap_icons_6x8[Icon_Radio_screen]);
@ -428,7 +428,7 @@ MAKE_MENU(main_menu_, "Rockbox Main Menu", mainmenu_callback,
bitmap_icons_6x8[Icon_Submenu_Entered], bitmap_icons_6x8[Icon_Submenu_Entered],
&mrb_bookmarks, &sound_settings, &mrb_bookmarks, &sound_settings,
&settings_menu_item, &manage_settings, &browse_themes, &settings_menu_item, &manage_settings, &browse_themes,
#ifdef CONFIG_TUNER #if CONFIG_TUNER
&load_radio_screen, &load_radio_screen,
#endif #endif
#ifdef HAVE_RECORDING #ifdef HAVE_RECORDING
@ -449,7 +449,7 @@ int dynamicitem_callback(int action,const struct menu_item_ex *this_item)
if (action != ACTION_ENTER_MENUITEM) if (action != ACTION_ENTER_MENUITEM)
return action; return action;
#ifdef CONFIG_TUNER #if CONFIG_TUNER
if (this_item == &load_radio_screen) if (this_item == &load_radio_screen)
{ {
if (radio_hardware_present() == 0) if (radio_hardware_present() == 0)

View file

@ -43,7 +43,7 @@
#include "button.h" #include "button.h"
#endif #endif
#include "usb.h" #include "usb.h"
#ifdef CONFIG_TUNER #if CONFIG_TUNER
#include "radio.h" #include "radio.h"
#endif #endif
#if defined(HAVE_RECORDING) && CONFIG_CODEC == SWCODEC #if defined(HAVE_RECORDING) && CONFIG_CODEC == SWCODEC
@ -96,7 +96,7 @@ int current_playmode(void)
} }
#endif #endif
#ifdef CONFIG_TUNER #if CONFIG_TUNER
audio_stat = get_radio_status(); audio_stat = get_radio_status();
if(audio_stat & FMRADIO_PLAYING) if(audio_stat & FMRADIO_PLAYING)
return STATUS_RADIO; return STATUS_RADIO;

View file

@ -145,7 +145,7 @@ drivers/rtc/rtc_as3514.c
#endif /* SIMULATOR */ #endif /* SIMULATOR */
/* Tuner */ /* Tuner */
#ifdef CONFIG_TUNER #if CONFIG_TUNER
#ifndef SIMULATOR #ifndef SIMULATOR
#if (CONFIG_TUNER & S1A0903X01) #if (CONFIG_TUNER & S1A0903X01)
drivers/fmradio.c drivers/fmradio.c

View file

@ -216,6 +216,12 @@
/* no known platform */ /* no known platform */
#endif #endif
/* now set any CONFIG_ defines correctly if they are not used,
No need to do this on CONFIG_'s which are compulsary (e.g CONFIG_CODEC ) */
#ifndef CONFIG_TUNER
#define CONFIG_TUNER 0
#endif
/* Enable the directory cache and tagcache in RAM if we have /* Enable the directory cache and tagcache in RAM if we have
* plenty of RAM. Both features can be enabled independently. */ * plenty of RAM. Both features can be enabled independently. */
#if ((defined(MEMORYSIZE) && (MEMORYSIZE > 8)) || MEM > 8) && \ #if ((defined(MEMORYSIZE) && (MEMORYSIZE > 8)) || MEM > 8) && \

View file

@ -37,7 +37,7 @@
#include "backlight.h" #include "backlight.h"
#include "lcd.h" #include "lcd.h"
#include "rtc.h" #include "rtc.h"
#ifdef CONFIG_TUNER #if CONFIG_TUNER
#include "fmradio.h" #include "fmradio.h"
#endif #endif
#ifdef HAVE_UDA1380 #ifdef HAVE_UDA1380
@ -634,7 +634,7 @@ static void handle_auto_poweroff(void)
#endif #endif
if(timeout && if(timeout &&
#if defined(CONFIG_TUNER) && !defined(BOOTLOADER) #if CONFIG_TUNER && !defined(BOOTLOADER)
(!(get_radio_status() & FMRADIO_PLAYING)) && (!(get_radio_status() & FMRADIO_PLAYING)) &&
#endif #endif
!usb_inserted() && !usb_inserted() &&