diff options
author | William Wilgus <me.theuser@yahoo.com> | 2018-10-15 23:04:04 -0400 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2018-10-18 00:06:31 +0200 |
commit | dd40c46d50f9f22643b828e80783d3576b9c1d50 (patch) | |
tree | b9700f7cbe53bb10e89d91b0c3cf1fea686eb813 | |
parent | e6b23a8f049a89f9f6254a7fa186d33dc65b0ba3 (diff) | |
download | rockbox-dd40c46d50f9f22643b828e80783d3576b9c1d50.tar.gz rockbox-dd40c46d50f9f22643b828e80783d3576b9c1d50.zip |
Fix menu warnings
change offending bool return to int
warning: cast between incompatible function types from
'_Bool (*)(void)' to 'int (*)(void)' [-Wcast-function-type]
forgot to remove -- typedef int (*menu_function)(void);
Change-Id: Ie4c8d3ddb0fb7843c4ec584203350d658d6bee3e
-rw-r--r-- | apps/alarm_menu.c | 6 | ||||
-rw-r--r-- | apps/alarm_menu.h | 2 | ||||
-rw-r--r-- | apps/debug_menu.c | 4 | ||||
-rw-r--r-- | apps/debug_menu.h | 2 | ||||
-rw-r--r-- | apps/enc_config.c | 8 | ||||
-rw-r--r-- | apps/enc_config.h | 2 | ||||
-rw-r--r-- | apps/menu.h | 1 | ||||
-rw-r--r-- | apps/menus/eq_menu.c | 12 | ||||
-rw-r--r-- | apps/menus/eq_menu.h | 2 | ||||
-rw-r--r-- | apps/menus/main_menu.c | 20 | ||||
-rw-r--r-- | apps/menus/playlist_menu.c | 8 | ||||
-rw-r--r-- | apps/menus/radio_menu.c | 2 | ||||
-rw-r--r-- | apps/menus/recording_menu.c | 11 | ||||
-rw-r--r-- | apps/menus/settings_menu.c | 6 | ||||
-rw-r--r-- | apps/menus/time_menu.c | 2 | ||||
-rw-r--r-- | apps/screens.c | 6 | ||||
-rw-r--r-- | apps/screens.h | 2 | ||||
-rw-r--r-- | apps/settings.c | 2 | ||||
-rw-r--r-- | apps/sound_menu.h | 2 | ||||
-rw-r--r-- | apps/tagtree.c | 8 | ||||
-rw-r--r-- | apps/tagtree.h | 4 | ||||
-rw-r--r-- | apps/tree.c | 6 | ||||
-rw-r--r-- | apps/tree.h | 2 |
23 files changed, 62 insertions, 58 deletions
diff --git a/apps/alarm_menu.c b/apps/alarm_menu.c index 12bc03ca20..497747bd7b 100644 --- a/apps/alarm_menu.c +++ b/apps/alarm_menu.c | |||
@@ -50,7 +50,7 @@ static void speak_time(int hours, int minutes, bool speak_hours, bool enqueue) | |||
50 | } | 50 | } |
51 | } | 51 | } |
52 | 52 | ||
53 | bool alarm_screen(void) | 53 | int alarm_screen(void) |
54 | { | 54 | { |
55 | int h, m; | 55 | int h, m; |
56 | bool done = false; | 56 | bool done = false; |
@@ -188,10 +188,10 @@ bool alarm_screen(void) | |||
188 | if(default_event_handler(button) == SYS_USB_CONNECTED) | 188 | if(default_event_handler(button) == SYS_USB_CONNECTED) |
189 | { | 189 | { |
190 | rtc_enable_alarm(false); | 190 | rtc_enable_alarm(false); |
191 | return true; | 191 | return 1; |
192 | } | 192 | } |
193 | break; | 193 | break; |
194 | } | 194 | } |
195 | } | 195 | } |
196 | return false; | 196 | return 0; |
197 | } | 197 | } |
diff --git a/apps/alarm_menu.h b/apps/alarm_menu.h index 01b3d8681c..9f6f1e1059 100644 --- a/apps/alarm_menu.h +++ b/apps/alarm_menu.h | |||
@@ -21,6 +21,6 @@ | |||
21 | #ifndef _ALARM_MENU_H | 21 | #ifndef _ALARM_MENU_H |
22 | #define _ALARM_MENU_H | 22 | #define _ALARM_MENU_H |
23 | 23 | ||
24 | bool alarm_screen(void); | 24 | int alarm_screen(void); |
25 | 25 | ||
26 | #endif | 26 | #endif |
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index dad9fe96c8..9cd2c9bb92 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -2708,14 +2708,14 @@ static const char* menu_get_name(int item, void * data, | |||
2708 | return menuitems[item].desc; | 2708 | return menuitems[item].desc; |
2709 | } | 2709 | } |
2710 | 2710 | ||
2711 | bool debug_menu(void) | 2711 | int debug_menu(void) |
2712 | { | 2712 | { |
2713 | struct simplelist_info info; | 2713 | struct simplelist_info info; |
2714 | 2714 | ||
2715 | simplelist_info_init(&info, "Debug Menu", ARRAYLEN(menuitems), NULL); | 2715 | simplelist_info_init(&info, "Debug Menu", ARRAYLEN(menuitems), NULL); |
2716 | info.action_callback = menu_action_callback; | 2716 | info.action_callback = menu_action_callback; |
2717 | info.get_name = menu_get_name; | 2717 | info.get_name = menu_get_name; |
2718 | return simplelist_show_list(&info); | 2718 | return (simplelist_show_list(&info)) ? 1 : 0; |
2719 | } | 2719 | } |
2720 | 2720 | ||
2721 | bool run_debug_screen(char* screen) | 2721 | bool run_debug_screen(char* screen) |
diff --git a/apps/debug_menu.h b/apps/debug_menu.h index 664a1ba762..1335cb1395 100644 --- a/apps/debug_menu.h +++ b/apps/debug_menu.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #ifndef _DEBUG_MENU_H | 21 | #ifndef _DEBUG_MENU_H |
22 | #define _DEBUG_MENU_H | 22 | #define _DEBUG_MENU_H |
23 | 23 | ||
24 | bool debug_menu(void); | 24 | int debug_menu(void); |
25 | bool run_debug_screen(char* screen); | 25 | bool run_debug_screen(char* screen); |
26 | 26 | ||
27 | #endif | 27 | #endif |
diff --git a/apps/enc_config.c b/apps/enc_config.c index 07405cdac1..7741c293f0 100644 --- a/apps/enc_config.c +++ b/apps/enc_config.c | |||
@@ -440,7 +440,7 @@ void enc_global_settings_apply(void) | |||
440 | 440 | ||
441 | /* Show an encoder's config menu based on the global_settings. | 441 | /* Show an encoder's config menu based on the global_settings. |
442 | Modified settings are placed in global_settings.enc_config. */ | 442 | Modified settings are placed in global_settings.enc_config. */ |
443 | bool enc_global_config_menu(void) | 443 | int enc_global_config_menu(void) |
444 | { | 444 | { |
445 | struct encoder_config cfg; | 445 | struct encoder_config cfg; |
446 | 446 | ||
@@ -453,12 +453,12 @@ bool enc_global_config_menu(void) | |||
453 | { | 453 | { |
454 | menu_callback_data.cfg = &cfg; | 454 | menu_callback_data.cfg = &cfg; |
455 | menu_callback_data.global = true; | 455 | menu_callback_data.global = true; |
456 | return do_menu(enc_data[cfg.rec_format].menu, NULL, NULL, false) | 456 | int retmenu = do_menu(enc_data[cfg.rec_format].menu, NULL, NULL, false); |
457 | == MENU_ATTACHED_USB; | 457 | return (retmenu == MENU_ATTACHED_USB) ? 1 : 0; |
458 | } | 458 | } |
459 | else | 459 | else |
460 | { | 460 | { |
461 | splash(HZ, ID2P(LANG_NO_SETTINGS)); | 461 | splash(HZ, ID2P(LANG_NO_SETTINGS)); |
462 | return false; | 462 | return 0; |
463 | } | 463 | } |
464 | } /* enc_global_config_menu */ | 464 | } /* enc_global_config_menu */ |
diff --git a/apps/enc_config.h b/apps/enc_config.h index 8c6f2efef7..368bf8cf6c 100644 --- a/apps/enc_config.h +++ b/apps/enc_config.h | |||
@@ -71,5 +71,5 @@ void enc_global_settings_apply(void); | |||
71 | 71 | ||
72 | /* Show an encoder's config menu based on the global_settings. | 72 | /* Show an encoder's config menu based on the global_settings. |
73 | Modified settings are placed in global_settings.enc_config. */ | 73 | Modified settings are placed in global_settings.enc_config. */ |
74 | bool enc_global_config_menu(void); | 74 | int enc_global_config_menu(void); |
75 | #endif /* ENC_CONFIG_H */ | 75 | #endif /* ENC_CONFIG_H */ |
diff --git a/apps/menu.h b/apps/menu.h index ee2d9e7f40..df5f7ced9f 100644 --- a/apps/menu.h +++ b/apps/menu.h | |||
@@ -41,7 +41,6 @@ enum menu_item_type { | |||
41 | }; | 41 | }; |
42 | #define MENU_TYPE_MASK 0xF /* MT_* type */ | 42 | #define MENU_TYPE_MASK 0xF /* MT_* type */ |
43 | 43 | ||
44 | typedef int (*menu_function)(void); | ||
45 | struct menu_func { | 44 | struct menu_func { |
46 | union { | 45 | union { |
47 | int (*function_w_param)(void* param); /* intptr_t instead of void* | 46 | int (*function_w_param)(void* param); /* intptr_t instead of void* |
diff --git a/apps/menus/eq_menu.c b/apps/menus/eq_menu.c index b9da3449a6..7cbf7b5d90 100644 --- a/apps/menus/eq_menu.c +++ b/apps/menus/eq_menu.c | |||
@@ -563,7 +563,7 @@ static void draw_eq_sliders(struct screen * screen, int x, int y, | |||
563 | } | 563 | } |
564 | 564 | ||
565 | /* Provides a graphical means of editing the EQ settings */ | 565 | /* Provides a graphical means of editing the EQ settings */ |
566 | bool eq_menu_graphical(void) | 566 | int eq_menu_graphical(void) |
567 | { | 567 | { |
568 | bool exit_request = false; | 568 | bool exit_request = false; |
569 | bool result = true; | 569 | bool result = true; |
@@ -753,10 +753,10 @@ bool eq_menu_graphical(void) | |||
753 | screens[i].set_viewport(NULL); | 753 | screens[i].set_viewport(NULL); |
754 | viewportmanager_theme_undo(i, false); | 754 | viewportmanager_theme_undo(i, false); |
755 | } | 755 | } |
756 | return result; | 756 | return (result) ? 1 : 0; |
757 | } | 757 | } |
758 | 758 | ||
759 | static bool eq_save_preset(void) | 759 | static int eq_save_preset(void) |
760 | { | 760 | { |
761 | /* make sure that the eq is enabled for setting saving */ | 761 | /* make sure that the eq is enabled for setting saving */ |
762 | bool enabled = global_settings.eq_enabled; | 762 | bool enabled = global_settings.eq_enabled; |
@@ -766,16 +766,16 @@ static bool eq_save_preset(void) | |||
766 | 766 | ||
767 | global_settings.eq_enabled = enabled; | 767 | global_settings.eq_enabled = enabled; |
768 | 768 | ||
769 | return result; | 769 | return (result) ? 1 : 0; |
770 | } | 770 | } |
771 | /* Allows browsing of preset files */ | 771 | /* Allows browsing of preset files */ |
772 | static struct browse_folder_info eqs = { EQS_DIR, SHOW_CFG }; | 772 | static struct browse_folder_info eqs = { EQS_DIR, SHOW_CFG }; |
773 | 773 | ||
774 | MENUITEM_FUNCTION(eq_graphical, 0, ID2P(LANG_EQUALIZER_GRAPHICAL), | 774 | MENUITEM_FUNCTION(eq_graphical, 0, ID2P(LANG_EQUALIZER_GRAPHICAL), |
775 | (int(*)(void))eq_menu_graphical, NULL, lowlatency_callback, | 775 | eq_menu_graphical, NULL, lowlatency_callback, |
776 | Icon_EQ); | 776 | Icon_EQ); |
777 | MENUITEM_FUNCTION(eq_save, 0, ID2P(LANG_EQUALIZER_SAVE), | 777 | MENUITEM_FUNCTION(eq_save, 0, ID2P(LANG_EQUALIZER_SAVE), |
778 | (int(*)(void))eq_save_preset, NULL, NULL, Icon_NOICON); | 778 | eq_save_preset, NULL, NULL, Icon_NOICON); |
779 | MENUITEM_FUNCTION(eq_browse, MENU_FUNC_USEPARAM, ID2P(LANG_EQUALIZER_BROWSE), | 779 | MENUITEM_FUNCTION(eq_browse, MENU_FUNC_USEPARAM, ID2P(LANG_EQUALIZER_BROWSE), |
780 | browse_folder, (void*)&eqs, lowlatency_callback, | 780 | browse_folder, (void*)&eqs, lowlatency_callback, |
781 | Icon_NOICON); | 781 | Icon_NOICON); |
diff --git a/apps/menus/eq_menu.h b/apps/menus/eq_menu.h index 8147088c2b..04e8be2ead 100644 --- a/apps/menus/eq_menu.h +++ b/apps/menus/eq_menu.h | |||
@@ -40,7 +40,7 @@ | |||
40 | #define EQ_USER_DIVISOR 10 | 40 | #define EQ_USER_DIVISOR 10 |
41 | 41 | ||
42 | bool eq_browse_presets(void); | 42 | bool eq_browse_presets(void); |
43 | bool eq_menu_graphical(void); | 43 | int eq_menu_graphical(void); |
44 | 44 | ||
45 | /* utility functions for settings_list.c */ | 45 | /* utility functions for settings_list.c */ |
46 | const char* eq_q_format(char* buffer, size_t buffer_size, int value, | 46 | const char* eq_q_format(char* buffer, size_t buffer_size, int value, |
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c index 8764101f73..139667cef4 100644 --- a/apps/menus/main_menu.c +++ b/apps/menus/main_menu.c | |||
@@ -111,7 +111,7 @@ MAKE_MENU(manage_settings, ID2P(LANG_MANAGE_MENU), NULL, Icon_Config, | |||
111 | /* INFO MENU */ | 111 | /* INFO MENU */ |
112 | 112 | ||
113 | 113 | ||
114 | static bool show_credits(void) | 114 | static int show_credits(void) |
115 | { | 115 | { |
116 | char credits[MAX_PATH] = { '\0' }; | 116 | char credits[MAX_PATH] = { '\0' }; |
117 | snprintf(credits, MAX_PATH, "%s/credits.rock", VIEWERS_DIR); | 117 | snprintf(credits, MAX_PATH, "%s/credits.rock", VIEWERS_DIR); |
@@ -122,7 +122,7 @@ static bool show_credits(void) | |||
122 | while (IS_SYSEVENT(get_action(CONTEXT_STD, TIMEOUT_BLOCK))) | 122 | while (IS_SYSEVENT(get_action(CONTEXT_STD, TIMEOUT_BLOCK))) |
123 | ; | 123 | ; |
124 | } | 124 | } |
125 | return false; | 125 | return 0; |
126 | } | 126 | } |
127 | 127 | ||
128 | #ifdef HAVE_LCD_CHARCELLS | 128 | #ifdef HAVE_LCD_CHARCELLS |
@@ -357,7 +357,7 @@ static int info_action_callback(int action, struct gui_synclist *lists) | |||
357 | } | 357 | } |
358 | return action; | 358 | return action; |
359 | } | 359 | } |
360 | static bool show_info(void) | 360 | static int show_info(void) |
361 | { | 361 | { |
362 | struct info_data data = {.new_data = true }; | 362 | struct info_data data = {.new_data = true }; |
363 | struct simplelist_info info; | 363 | struct simplelist_info info; |
@@ -369,10 +369,12 @@ static bool show_info(void) | |||
369 | if(global_settings.talk_menu) | 369 | if(global_settings.talk_menu) |
370 | info.get_talk = info_speak_item; | 370 | info.get_talk = info_speak_item; |
371 | info.action_callback = info_action_callback; | 371 | info.action_callback = info_action_callback; |
372 | return simplelist_show_list(&info); | 372 | return (simplelist_show_list(&info)) ? 1 : 0; |
373 | } | 373 | } |
374 | |||
375 | |||
374 | MENUITEM_FUNCTION(show_info_item, 0, ID2P(LANG_ROCKBOX_INFO), | 376 | MENUITEM_FUNCTION(show_info_item, 0, ID2P(LANG_ROCKBOX_INFO), |
375 | (menu_function)show_info, NULL, NULL, Icon_NOICON); | 377 | show_info, NULL, NULL, Icon_NOICON); |
376 | 378 | ||
377 | #if CONFIG_RTC | 379 | #if CONFIG_RTC |
378 | int time_screen(void* ignored); | 380 | int time_screen(void* ignored); |
@@ -381,11 +383,13 @@ MENUITEM_FUNCTION(timedate_item, MENU_FUNC_CHECK_RETVAL, ID2P(LANG_TIME_MENU), | |||
381 | #endif | 383 | #endif |
382 | 384 | ||
383 | MENUITEM_FUNCTION(show_credits_item, 0, ID2P(LANG_CREDITS), | 385 | MENUITEM_FUNCTION(show_credits_item, 0, ID2P(LANG_CREDITS), |
384 | (menu_function)show_credits, NULL, NULL, Icon_NOICON); | 386 | show_credits, NULL, NULL, Icon_NOICON); |
387 | |||
385 | MENUITEM_FUNCTION(show_runtime_item, 0, ID2P(LANG_RUNNING_TIME), | 388 | MENUITEM_FUNCTION(show_runtime_item, 0, ID2P(LANG_RUNNING_TIME), |
386 | (menu_function)view_runtime, NULL, NULL, Icon_NOICON); | 389 | view_runtime, NULL, NULL, Icon_NOICON); |
390 | |||
387 | MENUITEM_FUNCTION(debug_menu_item, 0, ID2P(LANG_DEBUG), | 391 | MENUITEM_FUNCTION(debug_menu_item, 0, ID2P(LANG_DEBUG), |
388 | (menu_function)debug_menu, NULL, NULL, Icon_NOICON); | 392 | debug_menu, NULL, NULL, Icon_NOICON); |
389 | 393 | ||
390 | MAKE_MENU(info_menu, ID2P(LANG_SYSTEM), 0, Icon_System_menu, | 394 | MAKE_MENU(info_menu, ID2P(LANG_SYSTEM), 0, Icon_System_menu, |
391 | &show_info_item, &show_credits_item, | 395 | &show_info_item, &show_credits_item, |
diff --git a/apps/menus/playlist_menu.c b/apps/menus/playlist_menu.c index f4fa6bc653..175ca19959 100644 --- a/apps/menus/playlist_menu.c +++ b/apps/menus/playlist_menu.c | |||
@@ -75,15 +75,13 @@ static int playlist_view_(void) | |||
75 | playlist_viewer_ex(NULL); | 75 | playlist_viewer_ex(NULL); |
76 | return 0; | 76 | return 0; |
77 | } | 77 | } |
78 | |||
79 | MENUITEM_FUNCTION(create_playlist_item, 0, ID2P(LANG_CREATE_PLAYLIST), | 78 | MENUITEM_FUNCTION(create_playlist_item, 0, ID2P(LANG_CREATE_PLAYLIST), |
80 | (int(*)(void))create_playlist, NULL, NULL, Icon_NOICON); | 79 | create_playlist, NULL, NULL, Icon_NOICON); |
81 | MENUITEM_FUNCTION(view_cur_playlist, 0, | 80 | MENUITEM_FUNCTION(view_cur_playlist, 0, |
82 | ID2P(LANG_VIEW_DYNAMIC_PLAYLIST), | 81 | ID2P(LANG_VIEW_DYNAMIC_PLAYLIST), |
83 | (int(*)(void))playlist_view_, NULL, NULL, Icon_NOICON); | 82 | playlist_view_, NULL, NULL, Icon_NOICON); |
84 | MENUITEM_FUNCTION(save_playlist, MENU_FUNC_USEPARAM, ID2P(LANG_SAVE_DYNAMIC_PLAYLIST), | 83 | MENUITEM_FUNCTION(save_playlist, MENU_FUNC_USEPARAM, ID2P(LANG_SAVE_DYNAMIC_PLAYLIST), |
85 | (int(*)(void*))save_playlist_screen, | 84 | save_playlist_screen, NULL, NULL, Icon_NOICON); |
86 | NULL, NULL, Icon_NOICON); | ||
87 | MENUITEM_SETTING(recursive_dir_insert, &global_settings.recursive_dir_insert, NULL); | 85 | MENUITEM_SETTING(recursive_dir_insert, &global_settings.recursive_dir_insert, NULL); |
88 | MENUITEM_SETTING(warn_on_erase, &global_settings.warnon_erase_dynplaylist, NULL); | 86 | MENUITEM_SETTING(warn_on_erase, &global_settings.warnon_erase_dynplaylist, NULL); |
89 | static int clear_catalog_directory(void) | 87 | static int clear_catalog_directory(void) |
diff --git a/apps/menus/radio_menu.c b/apps/menus/radio_menu.c index 8ab7151c3e..fb3d2b7fee 100644 --- a/apps/menus/radio_menu.c +++ b/apps/menus/radio_menu.c | |||
@@ -59,7 +59,7 @@ MENUITEM_FUNCTION(recscreen_item, 0, ID2P(LANG_RECORDING), | |||
59 | #define FM_RECORDING_SETTINGS | 59 | #define FM_RECORDING_SETTINGS |
60 | static int fm_recording_settings(void) | 60 | static int fm_recording_settings(void) |
61 | { | 61 | { |
62 | bool ret = recording_menu(true); | 62 | int ret = recording_menu(true); |
63 | 63 | ||
64 | #if CONFIG_CODEC != SWCODEC | 64 | #if CONFIG_CODEC != SWCODEC |
65 | if (!ret) | 65 | if (!ret) |
diff --git a/apps/menus/recording_menu.c b/apps/menus/recording_menu.c index 5038b1abad..54dc415de7 100644 --- a/apps/menus/recording_menu.c +++ b/apps/menus/recording_menu.c | |||
@@ -307,7 +307,7 @@ MENUITEM_FUNCTION(recformat, 0, ID2P(LANG_RECORDING_FORMAT), | |||
307 | recformat_func, NULL, NULL, Icon_Menu_setting); | 307 | recformat_func, NULL, NULL, Icon_Menu_setting); |
308 | 308 | ||
309 | MENUITEM_FUNCTION(enc_global_config_menu_item, 0, ID2P(LANG_ENCODER_SETTINGS), | 309 | MENUITEM_FUNCTION(enc_global_config_menu_item, 0, ID2P(LANG_ENCODER_SETTINGS), |
310 | (int(*)(void))enc_global_config_menu, | 310 | enc_global_config_menu, |
311 | NULL, NULL, Icon_Submenu); | 311 | NULL, NULL, Icon_Submenu); |
312 | 312 | ||
313 | #endif /* CONFIG_CODEC == SWCODEC */ | 313 | #endif /* CONFIG_CODEC == SWCODEC */ |
@@ -651,14 +651,15 @@ MAKE_MENU(recording_settings_menu, ID2P(LANG_RECORDING_SETTINGS), | |||
651 | &browse_recconfigs, &save_recpresets_item | 651 | &browse_recconfigs, &save_recpresets_item |
652 | ); | 652 | ); |
653 | 653 | ||
654 | bool recording_menu(bool no_source) | 654 | int recording_menu(bool no_source) |
655 | { | 655 | { |
656 | bool retval; | 656 | int retval; |
657 | no_source_in_menu = no_source; | 657 | no_source_in_menu = no_source; |
658 | retval = do_menu(&recording_settings_menu, NULL, NULL, false) == MENU_ATTACHED_USB; | 658 | int retmenu = do_menu(&recording_settings_menu, NULL, NULL, false); |
659 | retval = (retmenu == MENU_ATTACHED_USB) ? 1 : 0; | ||
659 | no_source_in_menu = false; /* always fall back to the default */ | 660 | no_source_in_menu = false; /* always fall back to the default */ |
660 | return retval; | 661 | return retval; |
661 | }; | 662 | }; |
662 | 663 | ||
663 | MENUITEM_FUNCTION(recording_settings, MENU_FUNC_USEPARAM, ID2P(LANG_RECORDING_SETTINGS), | 664 | MENUITEM_FUNCTION(recording_settings, MENU_FUNC_USEPARAM, ID2P(LANG_RECORDING_SETTINGS), |
664 | (int (*)(void*))recording_menu, 0, NULL, Icon_Recording); | 665 | recording_menu, 0, NULL, Icon_Recording); |
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c index 5c99cb4cd4..41734a9a63 100644 --- a/apps/menus/settings_menu.c +++ b/apps/menus/settings_menu.c | |||
@@ -152,11 +152,13 @@ MENUITEM_FUNCTION(tc_update, 0, ID2P(LANG_TAGCACHE_UPDATE), | |||
152 | (int(*)(void))tagcache_update_with_splash, | 152 | (int(*)(void))tagcache_update_with_splash, |
153 | NULL, NULL, Icon_NOICON); | 153 | NULL, NULL, Icon_NOICON); |
154 | MENUITEM_SETTING(runtimedb, &global_settings.runtimedb, NULL); | 154 | MENUITEM_SETTING(runtimedb, &global_settings.runtimedb, NULL); |
155 | |||
155 | MENUITEM_FUNCTION(tc_export, 0, ID2P(LANG_TAGCACHE_EXPORT), | 156 | MENUITEM_FUNCTION(tc_export, 0, ID2P(LANG_TAGCACHE_EXPORT), |
156 | (int(*)(void))tagtree_export, NULL, | 157 | tagtree_export, NULL, |
157 | NULL, Icon_NOICON); | 158 | NULL, Icon_NOICON); |
159 | |||
158 | MENUITEM_FUNCTION(tc_import, 0, ID2P(LANG_TAGCACHE_IMPORT), | 160 | MENUITEM_FUNCTION(tc_import, 0, ID2P(LANG_TAGCACHE_IMPORT), |
159 | (int(*)(void))tagtree_import, NULL, | 161 | tagtree_import, NULL, |
160 | NULL, Icon_NOICON); | 162 | NULL, Icon_NOICON); |
161 | MENUITEM_FUNCTION(tc_paths, 0, ID2P(LANG_SELECT_DATABASE_DIRS), | 163 | MENUITEM_FUNCTION(tc_paths, 0, ID2P(LANG_SELECT_DATABASE_DIRS), |
162 | dirs_to_scan, NULL, NULL, Icon_NOICON); | 164 | dirs_to_scan, NULL, NULL, Icon_NOICON); |
diff --git a/apps/menus/time_menu.c b/apps/menus/time_menu.c index a6885a3dbc..93ca786cea 100644 --- a/apps/menus/time_menu.c +++ b/apps/menus/time_menu.c | |||
@@ -82,7 +82,7 @@ MENUITEM_FUNCTION(time_set, 0, ID2P(LANG_SET_TIME), | |||
82 | MENUITEM_SETTING(timeformat, &global_settings.timeformat, NULL); | 82 | MENUITEM_SETTING(timeformat, &global_settings.timeformat, NULL); |
83 | #ifdef HAVE_RTC_ALARM | 83 | #ifdef HAVE_RTC_ALARM |
84 | MENUITEM_FUNCTION(alarm_screen_call, 0, ID2P(LANG_ALARM_MOD_ALARM_MENU), | 84 | MENUITEM_FUNCTION(alarm_screen_call, 0, ID2P(LANG_ALARM_MOD_ALARM_MENU), |
85 | (menu_function)alarm_screen, NULL, NULL, Icon_NOICON); | 85 | alarm_screen, NULL, NULL, Icon_NOICON); |
86 | #if CONFIG_TUNER || defined(HAVE_RECORDING) | 86 | #if CONFIG_TUNER || defined(HAVE_RECORDING) |
87 | 87 | ||
88 | #if CONFIG_TUNER && !defined(HAVE_RECORDING) | 88 | #if CONFIG_TUNER && !defined(HAVE_RECORDING) |
diff --git a/apps/screens.c b/apps/screens.c index 0334329b5d..e203b446cf 100644 --- a/apps/screens.c +++ b/apps/screens.c | |||
@@ -830,7 +830,7 @@ static int runtime_speak_data(int selected_item, void* data) | |||
830 | } | 830 | } |
831 | 831 | ||
832 | 832 | ||
833 | bool view_runtime(void) | 833 | int view_runtime(void) |
834 | { | 834 | { |
835 | static const char *lines[]={ID2P(LANG_CLEAR_TIME)}; | 835 | static const char *lines[]={ID2P(LANG_CLEAR_TIME)}; |
836 | static const struct text_message message={lines, 1}; | 836 | static const struct text_message message={lines, 1}; |
@@ -869,9 +869,9 @@ bool view_runtime(void) | |||
869 | } | 869 | } |
870 | } | 870 | } |
871 | if(default_event_handler(action) == SYS_USB_CONNECTED) | 871 | if(default_event_handler(action) == SYS_USB_CONNECTED) |
872 | return true; | 872 | return 1; |
873 | } | 873 | } |
874 | return false; | 874 | return 0; |
875 | } | 875 | } |
876 | 876 | ||
877 | #ifdef HAVE_TOUCHSCREEN | 877 | #ifdef HAVE_TOUCHSCREEN |
diff --git a/apps/screens.h b/apps/screens.h index 7f2bc6ed0e..d8b697a2a0 100644 --- a/apps/screens.h +++ b/apps/screens.h | |||
@@ -43,7 +43,7 @@ bool set_time_screen(const char* title, struct tm *tm); | |||
43 | 43 | ||
44 | bool shutdown_screen(void); | 44 | bool shutdown_screen(void); |
45 | bool browse_id3(void); | 45 | bool browse_id3(void); |
46 | bool view_runtime(void); | 46 | int view_runtime(void); |
47 | 47 | ||
48 | #ifdef HAVE_TOUCHSCREEN | 48 | #ifdef HAVE_TOUCHSCREEN |
49 | int calibrate(void); | 49 | int calibrate(void); |
diff --git a/apps/settings.c b/apps/settings.c index 8afec9f806..9f3047e9df 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -1183,7 +1183,7 @@ bool set_bool_options(const char* string, const bool* variable, | |||
1183 | bool result; | 1183 | bool result; |
1184 | 1184 | ||
1185 | result = set_option(string, variable, BOOL, names, 2, | 1185 | result = set_option(string, variable, BOOL, names, 2, |
1186 | (void (*)(int))function); | 1186 | (void (*)(int))(void (*)(void))function); |
1187 | return result; | 1187 | return result; |
1188 | } | 1188 | } |
1189 | 1189 | ||
diff --git a/apps/sound_menu.h b/apps/sound_menu.h index 611bda64d4..1ff2019a8f 100644 --- a/apps/sound_menu.h +++ b/apps/sound_menu.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #ifndef _SOUND_MENU_H | 21 | #ifndef _SOUND_MENU_H |
22 | #define _SOUND_MENU_H | 22 | #define _SOUND_MENU_H |
23 | 23 | ||
24 | bool recording_menu(bool no_source); | 24 | int recording_menu(bool no_source); |
25 | int rectrigger(void); | 25 | int rectrigger(void); |
26 | 26 | ||
27 | #endif | 27 | #endif |
diff --git a/apps/tagtree.c b/apps/tagtree.c index ba27c84f6a..c188a900fa 100644 --- a/apps/tagtree.c +++ b/apps/tagtree.c | |||
@@ -967,7 +967,7 @@ static void tagtree_track_finish_event(unsigned short id, void *ev_data) | |||
967 | #endif | 967 | #endif |
968 | } | 968 | } |
969 | 969 | ||
970 | bool tagtree_export(void) | 970 | int tagtree_export(void) |
971 | { | 971 | { |
972 | struct tagcache_search tcs; | 972 | struct tagcache_search tcs; |
973 | 973 | ||
@@ -977,10 +977,10 @@ bool tagtree_export(void) | |||
977 | splash(HZ*2, ID2P(LANG_FAILED)); | 977 | splash(HZ*2, ID2P(LANG_FAILED)); |
978 | } | 978 | } |
979 | 979 | ||
980 | return false; | 980 | return 0; |
981 | } | 981 | } |
982 | 982 | ||
983 | bool tagtree_import(void) | 983 | int tagtree_import(void) |
984 | { | 984 | { |
985 | splash(0, ID2P(LANG_WAIT)); | 985 | splash(0, ID2P(LANG_WAIT)); |
986 | if (!tagcache_import_changelog()) | 986 | if (!tagcache_import_changelog()) |
@@ -988,7 +988,7 @@ bool tagtree_import(void) | |||
988 | splash(HZ*2, ID2P(LANG_FAILED)); | 988 | splash(HZ*2, ID2P(LANG_FAILED)); |
989 | } | 989 | } |
990 | 990 | ||
991 | return false; | 991 | return 0; |
992 | } | 992 | } |
993 | 993 | ||
994 | static bool parse_menu(const char *filename); | 994 | static bool parse_menu(const char *filename); |
diff --git a/apps/tagtree.h b/apps/tagtree.h index 8369020371..427a602df6 100644 --- a/apps/tagtree.h +++ b/apps/tagtree.h | |||
@@ -31,8 +31,8 @@ | |||
31 | #define TAGMENU_MAX_MENUS 32 | 31 | #define TAGMENU_MAX_MENUS 32 |
32 | #define TAGMENU_MAX_FMTS 32 | 32 | #define TAGMENU_MAX_FMTS 32 |
33 | 33 | ||
34 | bool tagtree_export(void); | 34 | int tagtree_export(void); |
35 | bool tagtree_import(void); | 35 | int tagtree_import(void); |
36 | void tagtree_init(void) INIT_ATTR; | 36 | void tagtree_init(void) INIT_ATTR; |
37 | int tagtree_enter(struct tree_context* c); | 37 | int tagtree_enter(struct tree_context* c); |
38 | void tagtree_exit(struct tree_context* c); | 38 | void tagtree_exit(struct tree_context* c); |
diff --git a/apps/tree.c b/apps/tree.c index 6b496919b0..16e0f988dc 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -912,7 +912,7 @@ static int dirbrowse(void) | |||
912 | return true; | 912 | return true; |
913 | } | 913 | } |
914 | 914 | ||
915 | bool create_playlist(void) | 915 | int create_playlist(void) |
916 | { | 916 | { |
917 | char filename[MAX_PATH + 16]; /* add enough space for extension */ | 917 | char filename[MAX_PATH + 16]; /* add enough space for extension */ |
918 | 918 | ||
@@ -924,14 +924,14 @@ bool create_playlist(void) | |||
924 | 924 | ||
925 | 925 | ||
926 | if (kbd_input(filename, MAX_PATH)) | 926 | if (kbd_input(filename, MAX_PATH)) |
927 | return false; | 927 | return 0; |
928 | splashf(0, "%s %s", str(LANG_CREATING), filename); | 928 | splashf(0, "%s %s", str(LANG_CREATING), filename); |
929 | 929 | ||
930 | trigger_cpu_boost(); | 930 | trigger_cpu_boost(); |
931 | catalog_add_to_a_playlist(tc.currdir, ATTR_DIRECTORY, true, filename); | 931 | catalog_add_to_a_playlist(tc.currdir, ATTR_DIRECTORY, true, filename); |
932 | cancel_cpu_boost(); | 932 | cancel_cpu_boost(); |
933 | 933 | ||
934 | return true; | 934 | return 1; |
935 | } | 935 | } |
936 | 936 | ||
937 | void browse_context_init(struct browse_context *browse, | 937 | void browse_context_init(struct browse_context *browse, |
diff --git a/apps/tree.h b/apps/tree.h index 1601447b58..77dc5da1b4 100644 --- a/apps/tree.h +++ b/apps/tree.h | |||
@@ -116,7 +116,7 @@ void browse_context_init(struct browse_context *browse, | |||
116 | char *title, enum themable_icons icon, | 116 | char *title, enum themable_icons icon, |
117 | const char *root, const char *selected); | 117 | const char *root, const char *selected); |
118 | int rockbox_browse(struct browse_context *browse); | 118 | int rockbox_browse(struct browse_context *browse); |
119 | bool create_playlist(void); | 119 | int create_playlist(void); |
120 | void resume_directory(const char *dir); | 120 | void resume_directory(const char *dir); |
121 | static inline void tree_lock_cache(struct tree_context *t) | 121 | static inline void tree_lock_cache(struct tree_context *t) |
122 | { | 122 | { |