1
0
Fork 0
forked from len0rd/rockbox

don't assign NULL to a long (fixes sim build warnings)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10526 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Marcoen Hirschberg 2006-08-11 11:35:26 +00:00
parent 3b52bb9c68
commit ed70da26bd
5 changed files with 205 additions and 205 deletions

View file

@ -2097,22 +2097,22 @@ int show_menu(void) /* return 1 to quit */
{ "Return", NULL }, { "Return", NULL },
}; };
static const struct opt_items slideshow[2] = { static const struct opt_items slideshow[2] = {
{"Disable",NULL}, {"Disable",0},
{"Enable",NULL}, {"Enable",0},
}; };
static const struct opt_items timeout[12] = { static const struct opt_items timeout[12] = {
{ "1 second", NULL }, { "1 second", 0 },
{ "2 seconds", NULL }, { "2 seconds", 0 },
{ "3 seconds", NULL }, { "3 seconds", 0 },
{ "4 seconds", NULL }, { "4 seconds", 0 },
{ "5 seconds", NULL }, { "5 seconds", 0 },
{ "6 seconds", NULL }, { "6 seconds", 0 },
{ "7 seconds", NULL }, { "7 seconds", 0 },
{ "8 seconds", NULL }, { "8 seconds", 0 },
{ "9 seconds", NULL }, { "9 seconds", 0 },
{ "10 seconds", NULL }, { "10 seconds", 0 },
{ "15 seconds", NULL }, { "15 seconds", 0 },
{ "20 seconds", NULL }, { "20 seconds", 0 },
}; };
m = rb->menu_init(items, sizeof(items) / sizeof(*items), m = rb->menu_init(items, sizeof(items) / sizeof(*items),
NULL, NULL, NULL, NULL); NULL, NULL, NULL, NULL);

View file

@ -57,8 +57,8 @@ static bool volume(void)
static bool shuffle(void) static bool shuffle(void)
{ {
struct opt_items names[] = { struct opt_items names[] = {
{"No", NULL}, {"No", 0},
{"Yes", NULL} {"Yes", 0}
}; };
return api->set_option("Shuffle", &api->global_settings->playlist_shuffle, return api->set_option("Shuffle", &api->global_settings->playlist_shuffle,
BOOL, names, 2,NULL); BOOL, names, 2,NULL);
@ -68,12 +68,12 @@ static bool repeat_mode(void)
{ {
bool result; bool result;
static const struct opt_items names[] = { static const struct opt_items names[] = {
{ "Off", NULL }, { "Off", 0 },
{ "Repeat All", NULL }, { "Repeat All", 0 },
{ "Repeat One", NULL }, { "Repeat One", 0 },
{ "Repeat Shuffle", NULL }, { "Repeat Shuffle", 0 },
#ifdef AB_REPEAT_ENABLE #ifdef AB_REPEAT_ENABLE
{ "Repeat A-B", NULL } { "Repeat A-B", 0 }
#endif #endif
}; };

View file

@ -147,42 +147,42 @@ static bool pacbox_menu(void)
bool need_restart = false; bool need_restart = false;
static const struct opt_items noyes[2] = { static const struct opt_items noyes[2] = {
{ "No", NULL }, { "No", 0 },
{ "Yes", NULL }, { "Yes", 0 },
}; };
static const struct opt_items difficulty_options[2] = { static const struct opt_items difficulty_options[2] = {
{ "Normal", NULL }, { "Normal", 0 },
{ "Harder", NULL }, { "Harder", 0 },
}; };
static const struct opt_items numlives_options[4] = { static const struct opt_items numlives_options[4] = {
{ "1", NULL }, { "1", 0 },
{ "2", NULL }, { "2", 0 },
{ "3", NULL }, { "3", 0 },
{ "5", NULL }, { "5", 0 },
}; };
static const struct opt_items bonus_options[4] = { static const struct opt_items bonus_options[4] = {
{ "10000 points", NULL }, { "10000 points", 0 },
{ "15000 points", NULL }, { "15000 points", 0 },
{ "20000 points", NULL }, { "20000 points", 0 },
{ "No bonus", NULL }, { "No bonus", 0 },
}; };
static const struct opt_items ghostname_options[2] = { static const struct opt_items ghostname_options[2] = {
{ "Normal", NULL }, { "Normal", 0 },
{ "Alternate", NULL }, { "Alternate", 0 },
}; };
static const struct menu_item items[] = { static const struct menu_item items[] = {
{ "Difficulty", NULL }, { "Difficulty", 0 },
{ "Pacmen Per Game", NULL }, { "Pacmen Per Game", 0 },
{ "Bonus Life", NULL }, { "Bonus Life", 0 },
{ "Ghost Names", NULL }, { "Ghost Names", 0 },
{ "Display FPS", NULL }, { "Display FPS", 0 },
{ "Restart", NULL }, { "Restart", 0 },
{ "Quit", NULL }, { "Quit", 0 },
}; };
m = rb->menu_init(items, sizeof(items) / sizeof(*items), m = rb->menu_init(items, sizeof(items) / sizeof(*items),

View file

@ -322,29 +322,29 @@ static void do_opt_menu(void)
int result; int result;
static const struct opt_items onoff[2] = { static const struct opt_items onoff[2] = {
{ "Off", NULL }, { "Off", 0 },
{ "On" , NULL }, { "On" , 0 },
}; };
static const struct opt_items fullscreen[]= { static const struct opt_items fullscreen[]= {
{ "Off", NULL }, { "Off", 0 },
{ "Fullscreen", NULL }, { "Fullscreen", 0 },
{ "Full - Maintain Ratio", NULL }, { "Full - Maintain Ratio", 0 },
}; };
static const struct opt_items frameskip[]= { static const struct opt_items frameskip[]= {
{ "3 Max", NULL }, { "3 Max", 0 },
{ "4 Max", NULL }, { "4 Max", 0 },
{ "5 Max", NULL }, { "5 Max", 0 },
{ "6 Max", NULL }, { "6 Max", 0 },
}; };
static const struct menu_item items[] = { static const struct menu_item items[] = {
{"Max Frameskip", NULL }, {"Max Frameskip", 0 },
{"Sound" , NULL }, {"Sound" , 0 },
{"Stats" , NULL }, {"Stats" , 0 },
{"Fullscreen" , NULL }, {"Fullscreen" , 0 },
{"Set Keys (Buggy)", NULL }, {"Set Keys (Buggy)", 0 },
}; };
m = rb->menu_init(items, sizeof(items) / sizeof(*items), NULL, NULL, NULL, NULL); m = rb->menu_init(items, sizeof(items) / sizeof(*items), NULL, NULL, NULL, NULL);

View file

@ -2103,9 +2103,9 @@ bool set_worm_num_worms(void)
{ {
bool ret; bool ret;
static const struct opt_items num_worms_option[3] = { static const struct opt_items num_worms_option[3] = {
{ "1", NULL }, { "1", 0 },
{ "2", NULL }, { "2", 0 },
{ "3", NULL }, { "3", 0 },
}; };
ret = rb->set_option("Number Of Worms", &worm_count,INT, num_worms_option, 3, NULL); ret = rb->set_option("Number Of Worms", &worm_count,INT, num_worms_option, 3, NULL);
@ -2122,10 +2122,10 @@ bool set_worm_num_players(void)
{ {
bool ret; bool ret;
static const struct opt_items num_players_option[4] = { static const struct opt_items num_players_option[4] = {
{ "0", NULL }, { "0", 0 },
{ "1", NULL }, { "1", 0 },
{ "2", NULL }, { "2", 0 },
{ "3", NULL } { "3", 0 }
}; };
ret = rb->set_option("Number of Players", &players, INT,num_players_option , 4, NULL); ret = rb->set_option("Number of Players", &players, INT,num_players_option , 4, NULL);
@ -2144,17 +2144,17 @@ Sets the size of each argh block created
bool set_worm_argh_size(void) bool set_worm_argh_size(void)
{ {
static const struct opt_items argh_size_option[11] = { static const struct opt_items argh_size_option[11] = {
{ "0", NULL }, { "0", 0 },
{ "1", NULL }, { "1", 0 },
{ "2", NULL }, { "2", 0 },
{ "3", NULL }, { "3", 0 },
{ "4", NULL }, { "4", 0 },
{ "5", NULL }, { "5", 0 },
{ "6", NULL }, { "6", 0 },
{ "7", NULL }, { "7", 0 },
{ "8", NULL }, { "8", 0 },
{ "9", NULL }, { "9", 0 },
{ "10", NULL } { "10", 0 }
}; };
return rb->set_option("Argh Size", &argh_size,INT,argh_size_option , 11, NULL); return rb->set_option("Argh Size", &argh_size,INT,argh_size_option , 11, NULL);
@ -2166,17 +2166,17 @@ Sets the amount a worm grows per food
bool set_worm_food(void) bool set_worm_food(void)
{ {
static const struct opt_items worm_food_option[11] = { static const struct opt_items worm_food_option[11] = {
{ "0", NULL }, { "0", 0 },
{ "1", NULL }, { "1", 0 },
{ "2", NULL }, { "2", 0 },
{ "3", NULL }, { "3", 0 },
{ "4", NULL }, { "4", 0 },
{ "5", NULL }, { "5", 0 },
{ "6", NULL }, { "6", 0 },
{ "7", NULL }, { "7", 0 },
{ "8", NULL }, { "8", 0 },
{ "9", NULL }, { "9", 0 },
{ "10", NULL } { "10", 0 }
}; };
return rb->set_option("Worm Growth Per Food", &worm_food,INT,worm_food_option , 11, NULL); return rb->set_option("Worm Growth Per Food", &worm_food,INT,worm_food_option , 11, NULL);
} }
@ -2187,11 +2187,11 @@ Sets the number of arghs created per food
bool set_argh_per_food(void) bool set_argh_per_food(void)
{ {
static const struct opt_items argh_food_option[5] = { static const struct opt_items argh_food_option[5] = {
{ "0", NULL }, { "0", 0 },
{ "1", NULL }, { "1", 0 },
{ "2", NULL }, { "2", 0 },
{ "3", NULL }, { "3", 0 },
{ "4", NULL }, { "4", 0 },
}; };
return rb->set_option("Arghs Per Food", &arghs_per_food,INT,argh_food_option , 5, NULL); return rb->set_option("Arghs Per Food", &arghs_per_food,INT,argh_food_option , 5, NULL);
} }
@ -2203,25 +2203,25 @@ bool set_worm_speed(void)
{ {
bool ret; bool ret;
static const struct opt_items speed_option[19] = { static const struct opt_items speed_option[19] = {
{ "0", NULL }, { "0", 0 },
{ "1", NULL }, { "1", 0 },
{ "2", NULL }, { "2", 0 },
{ "3", NULL }, { "3", 0 },
{ "4", NULL }, { "4", 0 },
{ "5", NULL }, { "5", 0 },
{ "6", NULL }, { "6", 0 },
{ "7", NULL }, { "7", 0 },
{ "8", NULL }, { "8", 0 },
{ "9", NULL }, { "9", 0 },
{ "10", NULL }, { "10", 0 },
{ "11", NULL }, { "11", 0 },
{ "12", NULL }, { "12", 0 },
{ "13", NULL }, { "13", 0 },
{ "14", NULL }, { "14", 0 },
{ "15", NULL }, { "15", 0 },
{ "16", NULL }, { "16", 0 },
{ "17", NULL }, { "17", 0 },
{ "18", NULL }, { "18", 0 },
}; };
@ -2240,17 +2240,17 @@ bool set_bool_options(char* string, bool* variable,
bool set_worm_control_style(void) bool set_worm_control_style(void)
{ {
static const struct opt_items key1_option[2] = { static const struct opt_items key1_option[2] = {
{ "Remote Control", NULL }, { "Remote Control", 0 },
{ "No Rem. Control", NULL }, { "No Rem. Control", 0 },
}; };
static const struct opt_items key2_option[2] = { static const struct opt_items key2_option[2] = {
{ "2 Key Control", NULL }, { "2 Key Control", 0 },
{ "4 Key COntrol", NULL }, { "4 Key COntrol", 0 },
}; };
static const struct opt_items key3_option[1] = { static const struct opt_items key3_option[1] = {
{ "Out of Control", NULL }, { "Out of Control", 0 },
}; };
if (players > 1) { if (players > 1) {
@ -2352,14 +2352,14 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
/* Setup screen */ /* Setup screen */
static const struct opt_items noyes[2] = { static const struct opt_items noyes[2] = {
{ "No", NULL }, { "No", 0 },
{ "Yes", NULL }, { "Yes", 0 },
}; };
static const struct opt_items num_worms_option[3] = { static const struct opt_items num_worms_option[3] = {
{ "1", NULL }, { "1", 0 },
{ "2", NULL }, { "2", 0 },
{ "3", NULL } { "3", 0 }
}; };
#ifdef MULTIPLAYER #ifdef MULTIPLAYER
@ -2367,129 +2367,129 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
#else #else
static const struct opt_items num_players_option[2] = { static const struct opt_items num_players_option[2] = {
#endif #endif
{ "0", NULL }, { "0", 0 },
{ "1", NULL } { "1", 0 }
#ifdef MULTIPLAYER #ifdef MULTIPLAYER
,{ "2", NULL }, ,{ "2", 0 },
{ "3", NULL } { "3", 0 }
#endif #endif
}; };
static const struct opt_items argh_size_option[9] = { static const struct opt_items argh_size_option[9] = {
{ "2", NULL }, { "2", 0 },
{ "3", NULL }, { "3", 0 },
{ "4", NULL }, { "4", 0 },
{ "5", NULL }, { "5", 0 },
{ "6", NULL }, { "6", 0 },
{ "7", NULL }, { "7", 0 },
{ "8", NULL }, { "8", 0 },
{ "9", NULL }, { "9", 0 },
{ "10", NULL } { "10", 0 }
}; };
static const struct opt_items food_size_option[9] = { static const struct opt_items food_size_option[9] = {
{ "2", NULL }, { "2", 0 },
{ "3", NULL }, { "3", 0 },
{ "4", NULL }, { "4", 0 },
{ "5", NULL }, { "5", 0 },
{ "6", NULL }, { "6", 0 },
{ "7", NULL }, { "7", 0 },
{ "8", NULL }, { "8", 0 },
{ "9", NULL }, { "9", 0 },
{ "10", NULL } { "10", 0 }
}; };
static const struct opt_items worm_food_option[16] = { static const struct opt_items worm_food_option[16] = {
{ "0", NULL }, { "0", 0 },
{ "1", NULL }, { "1", 0 },
{ "2", NULL }, { "2", 0 },
{ "3", NULL }, { "3", 0 },
{ "4", NULL }, { "4", 0 },
{ "5", NULL }, { "5", 0 },
{ "6", NULL }, { "6", 0 },
{ "7", NULL }, { "7", 0 },
{ "8", NULL }, { "8", 0 },
{ "9", NULL }, { "9", 0 },
{ "10", NULL }, { "10", 0 },
{ "11", NULL }, { "11", 0 },
{ "12", NULL }, { "12", 0 },
{ "13", NULL }, { "13", 0 },
{ "14", NULL }, { "14", 0 },
{ "15", NULL } { "15", 0 }
}; };
static const struct opt_items argh_food_option[9] = { static const struct opt_items argh_food_option[9] = {
{ "0", NULL }, { "0", 0 },
{ "1", NULL }, { "1", 0 },
{ "2", NULL }, { "2", 0 },
{ "3", NULL }, { "3", 0 },
{ "4", NULL }, { "4", 0 },
{ "5", NULL }, { "5", 0 },
{ "6", NULL }, { "6", 0 },
{ "7", NULL }, { "7", 0 },
{ "8", NULL } { "8", 0 }
}; };
static const struct opt_items speed_option[21] = { static const struct opt_items speed_option[21] = {
{ "0", NULL }, { "0", 0 },
{ "1", NULL }, { "1", 0 },
{ "2", NULL }, { "2", 0 },
{ "3", NULL }, { "3", 0 },
{ "4", NULL }, { "4", 0 },
{ "5", NULL }, { "5", 0 },
{ "6", NULL }, { "6", 0 },
{ "7", NULL }, { "7", 0 },
{ "8", NULL }, { "8", 0 },
{ "9", NULL }, { "9", 0 },
{ "10", NULL }, { "10", 0 },
{ "11", NULL }, { "11", 0 },
{ "12", NULL }, { "12", 0 },
{ "13", NULL }, { "13", 0 },
{ "14", NULL }, { "14", 0 },
{ "15", NULL }, { "15", 0 },
{ "16", NULL }, { "16", 0 },
{ "17", NULL }, { "17", 0 },
{ "18", NULL }, { "18", 0 },
{ "19", NULL }, { "19", 0 },
{ "20", NULL } { "20", 0 }
}; };
static const struct opt_items remoteonly_option[1] = { static const struct opt_items remoteonly_option[1] = {
{ "Remote Control", NULL } { "Remote Control", 0 }
}; };
static const struct opt_items key24_option[2] = { static const struct opt_items key24_option[2] = {
{ "4 Key Control", NULL }, { "4 Key Control", 0 },
{ "2 Key Control", NULL } { "2 Key Control", 0 }
}; };
#ifdef REMOTE #ifdef REMOTE
static const struct opt_items remote_option[2] = { static const struct opt_items remote_option[2] = {
{ "Remote Control", NULL }, { "Remote Control", 0 },
{ "No Rem. Control", NULL } { "No Rem. Control", 0 }
}; };
#else #else
static const struct opt_items key2_option[1] = { static const struct opt_items key2_option[1] = {
{ "2 Key Control", NULL } { "2 Key Control", 0 }
}; };
#endif #endif
static const struct opt_items nokey_option[1] = { static const struct opt_items nokey_option[1] = {
{ "Out of Control", NULL } { "Out of Control", 0 }
}; };
static const struct menu_item items[] = { static const struct menu_item items[] = {
{ "Play Wormlet!", NULL }, { "Play Wormlet!", 0 },
{ "Number of Worms", NULL }, { "Number of Worms", 0 },
{ "Number of Players", NULL }, { "Number of Players", 0 },
{ "Control Style", NULL }, { "Control Style", 0 },
{ "Worm Growth Per Food", NULL }, { "Worm Growth Per Food", 0 },
{ "Worm Speed", NULL }, { "Worm Speed", 0 },
{ "Arghs Per Food", NULL }, { "Arghs Per Food", 0 },
{ "Argh Size", NULL }, { "Argh Size", 0 },
{ "Food Size", NULL }, { "Food Size", 0 },
{ "Revert to Default Settings", NULL }, { "Revert to Default Settings", 0 },
{ "Quit", NULL } { "Quit", 0 }
}; };
m = rb->menu_init(items, sizeof(items) / sizeof(*items), m = rb->menu_init(items, sizeof(items) / sizeof(*items),