Changed the FOR_NB_SCREENS macro to always be a for loop that declares its own loop variable. This removes the need to declare this variable in the outer scope.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30756 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2011-10-15 19:35:02 +00:00
parent f301ac05f9
commit 0942e2a0f7
59 changed files with 47 additions and 143 deletions

View file

@ -539,7 +539,6 @@ int handle_radio_presets(void)
int presets_scan(void *viewports)
{
bool do_scan = true;
int i;
struct viewport *vp = (struct viewport *)viewports;
FOR_NB_SCREENS(i)

View file

@ -355,7 +355,6 @@ void radio_screen(void)
{
bool done = false;
int button;
int i;
bool stereo = false, last_stereo = false;
int update_type = 0;
bool screen_freeze = false;

View file

@ -63,7 +63,6 @@ char* default_radio_skin(enum screen_type screen)
void fms_fix_displays(enum fms_exiting toggle_state)
{
int i;
FOR_NB_SCREENS(i)
{
struct wps_data *data = skin_get_gwps(FM_SCREEN, i)->data;

View file

@ -99,7 +99,7 @@ static int load_radioart_image(struct radioart *ra, const char* preset_name,
int radio_get_art_hid(struct dim *requested_dim)
{
int preset = radio_current_preset();
int i, free_idx = -1;
int free_idx = -1;
const char* preset_name;
if (radio_scan_mode() || preset < 0)
return -1;
@ -108,7 +108,7 @@ int radio_get_art_hid(struct dim *requested_dim)
return -1;
#endif
preset_name = radio_get_preset_name(preset);
for(i=0;i<MAX_RADIOART_IMAGES;i++)
for (int i=0; i<MAX_RADIOART_IMAGES; i++)
{
if (radioart[i].handle < 0)
{