Ticket #3465: mc-3465-cleanup-missing_variable_declarations-warning-v2.patch
File mc-3465-cleanup-missing_variable_declarations-warning-v2.patch, 8.8 KB (added by and, 10 years ago) |
---|
-
m4.include/mc-cflags.m4
fix -Wmissing-variable-declarations warnings and add to mc cflags color-internal.c:57:28: warning: no previous extern declaration for non-static variable 'color_table' [-Wmissing-variable-declarations] color-internal.c:84:28: warning: no previous extern declaration for non-static variable 'attributes_table' [-Wmissing-variable-declarations] vfs.c:65:12: warning: no previous extern declaration for non-static variable 'vfs__classes_list' [-Wmissing-variable-declarations] vfs.c:67:10: warning: no previous extern declaration for non-static variable 'vfs_str_buffer' [-Wmissing-variable-declarations] vfs.c:68:19: warning: no previous extern declaration for non-static variable 'current_vfs' [-Wmissing-variable-declarations] interface.c:67:16: warning: no previous extern declaration for non-static variable 'mc_readdir_result' [-Wmissing-variable-declarations] boxes.c:96:15: warning: no previous extern declaration for non-static variable 'configure_old_esc_mode_id' [-Wmissing-variable-declarations] boxes.c:96:42: warning: no previous extern declaration for non-static variable 'configure_time_out_id' [-Wmissing-variable-declarations] boxes.c:114:12: warning: no previous extern declaration for non-static variable 'skin_names' [-Wmissing-variable-declarations] boxes.c:115:8: warning: no previous extern declaration for non-static variable 'current_skin_name' [-Wmissing-variable-declarations] filegui.c:253:3: warning: no previous extern declaration for non-static variable 'progress_buttons' [-Wmissing-variable-declarations] find.c:195:14: warning: no previous extern declaration for non-static variable 'quit_button' [-Wmissing-variable-declarations] layout.c:105:5: warning: no previous extern declaration for non-static variable 'ok_to_refresh' [-Wmissing-variable-declarations] extfs.c:69:9: warning: no previous extern declaration for non-static variable 'extfs_plugins' [-Wmissing-variable-declarations] args.c:50:10: warning: no previous extern declaration for non-static variable 'mc_args__show_version' [-Wmissing-variable-declarations] args.c:195:15: warning: no previous extern declaration for non-static variable 'terminal_group' [-Wmissing-variable-declarations] args.c:282:15: warning: no previous extern declaration for non-static variable 'color_group' [-Wmissing-variable-declarations] setup.c:127:5: warning: no previous extern declaration for non-static variable 'saving_setup' [-Wmissing-variable-declarations] config_parser.c:80:3: error: no previous extern declaration for non-static variable 'config_variables' [-Werror,-Wmissing-variable-declarations] spell.c:66:29: error: no previous extern declaration for non-static variable 'mc_aspell_speller_error' [-Werror,-Wmissing-variable-declarations] Signed-off-by: Andreas Mohr <and@gmx.li>
a b 66 66 MC_CHECK_ONE_CFLAG([-Wmissing-field-initializers]) 67 67 MC_CHECK_ONE_CFLAG([-Wmissing-parameter-type]) 68 68 MC_CHECK_ONE_CFLAG([-Wmissing-prototypes]) 69 MC_CHECK_ONE_CFLAG([-Wmissing-variable-declarations]) 69 70 MC_CHECK_ONE_CFLAG([-Wnested-externs]) 70 71 MC_CHECK_ONE_CFLAG([-Wno-long-long]) 71 72 MC_CHECK_ONE_CFLAG([-Wno-unreachable-code]) -
src/args.c
a b 47 47 /*** global variables ****************************************************************************/ 48 48 49 49 /* If true, show version info and exit */ 50 gboolean mc_args__show_version = FALSE;50 static gboolean mc_args__show_version = FALSE; 51 51 52 52 /* If true, assume we are running on an xterm terminal */ 53 53 gboolean mc_args__force_xterm = FALSE; … … 192 192 /* *INDENT-ON* */ 193 193 }; 194 194 195 GOptionGroup *terminal_group;195 static GOptionGroup *terminal_group; 196 196 #define ARGS_TERM_OPTIONS 0 197 197 static const GOptionEntry argument_terminal_table[] = { 198 198 /* *INDENT-OFF* */ … … 279 279 280 280 #undef ARGS_TERM_OPTIONS 281 281 282 GOptionGroup *color_group;282 static GOptionGroup *color_group; 283 283 #define ARGS_COLOR_OPTIONS 0 284 284 /* #define ARGS_COLOR_OPTIONS G_OPTION_FLAG_IN_MAIN */ 285 285 static const GOptionEntry argument_color_table[] = { -
lib/tty/color-internal.c
a b 54 54 55 55 /*** file scope variables ************************************************************************/ 56 56 57 mc_tty_color_table_t const color_table[] = {57 static mc_tty_color_table_t const color_table[] = { 58 58 {"black", COLOR_BLACK}, 59 59 {"gray", COLOR_BLACK + COLOR_INTENSITY}, 60 60 {"red", COLOR_RED}, … … 81 81 {NULL, 0} 82 82 }; 83 83 84 mc_tty_color_table_t const attributes_table[] = {84 static mc_tty_color_table_t const attributes_table[] = { 85 85 {"bold", A_BOLD}, 86 86 #ifdef A_ITALIC /* available since ncurses-5.9-20130831 / slang-pre2.3.0-107 */ 87 87 {"italic", A_ITALIC}, -
lib/vfs/interface.c
a b 61 61 62 62 extern GString *vfs_str_buffer; 63 63 extern struct vfs_class *current_vfs; 64 64 extern struct dirent *mc_readdir_result; 65 65 /*** global variables ****************************************************************************/ 66 66 67 67 struct dirent *mc_readdir_result = NULL; -
lib/vfs/vfs.c
a b 60 60 #include "gc.h" 61 61 62 62 extern struct dirent *mc_readdir_result; 63 extern GPtrArray *vfs__classes_list; 64 extern GString *vfs_str_buffer; 65 extern struct vfs_class *current_vfs; 63 66 /*** global variables ****************************************************************************/ 64 67 65 68 GPtrArray *vfs__classes_list = NULL; 66 69 67 70 GString *vfs_str_buffer = NULL; 68 struct vfs_class *current_vfs = NULL;69 71 72 struct vfs_class *current_vfs = NULL; 70 73 71 74 /*** file scope macro definitions ****************************************************************/ 72 75 -
src/filemanager/boxes.c
a b 93 93 94 94 /*** file scope variables ************************************************************************/ 95 95 96 unsigned long configure_old_esc_mode_id, configure_time_out_id;96 static unsigned long configure_old_esc_mode_id, configure_time_out_id; 97 97 98 98 /* Index in list_types[] for "user defined" */ 99 99 static const int panel_listing_user_idx = 3; … … 111 111 static unsigned long ftpfs_always_use_proxy_id, ftpfs_proxy_host_id; 112 112 #endif /* ENABLE_VFS && ENABLE_VFS_FTP */ 113 113 114 GPtrArray *skin_names;115 gchar *current_skin_name;114 static GPtrArray *skin_names; 115 static gchar *current_skin_name; 116 116 117 117 #ifdef ENABLE_BACKGROUND 118 118 static WListbox *bg_list = NULL; -
src/filemanager/filegui.c
a b 243 243 244 244 /*** file scope variables ************************************************************************/ 245 245 246 st ruct246 static struct 247 247 { 248 248 Widget *w; 249 249 FileProgressStatus action; -
src/filemanager/find.c
a b 192 192 /* *INDENT-ON* */ 193 193 194 194 static const size_t fbuts_num = G_N_ELEMENTS (fbuts); 195 const size_t quit_button = 4; /* index of "Quit" button */195 static const size_t quit_button = 4; /* index of "Quit" button */ 196 196 197 197 static WListbox *find_list; /* Listbox with the file list */ 198 198 -
src/filemanager/layout.c
a b 66 66 #include "layout.h" 67 67 #include "info.h" /* The Info widget */ 68 68 69 extern int ok_to_refresh; 69 70 /*** global variables ****************************************************************************/ 70 71 71 72 panels_layout_t panels_layout = { -
src/setup.c
a b 78 78 79 79 #include "setup.h" 80 80 81 extern int saving_setup; 81 82 /*** global variables ****************************************************************************/ 82 83 83 84 char *global_profile_name; /* mc.lib */ -
src/vfs/extfs/extfs.c
a b 66 66 67 67 /*** global variables ****************************************************************************/ 68 68 69 GArray *extfs_plugins = NULL;69 static GArray *extfs_plugins = NULL; 70 70 71 71 /*** file scope macro definitions ****************************************************************/ 72 72 -
src/vfs/sftpfs/config_parser.c
a b 71 71 /*** file scope variables ************************************************************************/ 72 72 73 73 /* *INDENT-OFF* */ 74 st ruct74 static struct 75 75 { 76 76 const char *pattern; 77 77 mc_search_t *pattern_regexp; -
src/editor/spell.c
a b 63 63 static struct AspellCanHaveError *(*mc_new_aspell_speller) (struct AspellConfig * config); 64 64 static unsigned int (*mc_aspell_error_number) (const struct AspellCanHaveError * ths); 65 65 static const char *(*mc_aspell_speller_error_message) (const struct AspellSpeller * ths); 66 const struct AspellError *(*mc_aspell_speller_error) (const struct AspellSpeller * ths);66 static const struct AspellError *(*mc_aspell_speller_error) (const struct AspellSpeller * ths); 67 67 68 68 static struct AspellSpeller *(*mc_to_aspell_speller) (struct AspellCanHaveError * obj); 69 69 static int (*mc_aspell_speller_check) (struct AspellSpeller * ths, const char *word, int word_size);