Mercurial > hg > forks > geeqie
changeset 2444:d99bdd1115fd
Merge remote-tracking branch 'github_caclark_geeqie/master'
* github_caclark_geeqie/master:
Add "-Werror -Wno-error=" to the default CFLAGS.
Fix GCC and Clang compile warnings.
author | Klaus Ethgen <Klaus@Ethgen.de> |
---|---|
date | Wed, 15 Feb 2017 23:40:03 +0100 |
parents | cb9f25cb54f3 (current diff) e8f835110f9c (diff) |
children | 7a904efa2e8b |
files | src/layout.c src/layout_util.c src/preferences.c src/typedefs.h |
diffstat | 7 files changed, 16 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.in Tue Feb 14 13:07:07 2017 +0000 +++ b/configure.in Wed Feb 15 23:40:03 2017 +0100 @@ -17,6 +17,9 @@ AC_PREREQ(2.57) AC_INIT([geeqie], m4_esyscmd_s(git rev-parse --quiet --verify --short master), [geeqie-devel@lists.sourceforge.net], [], [http://www.geeqie.org/]) +# Add -Werror to the default CFLAGS +CFLAGS+=" -Werror -Wno-error=deprecated-declarations" + # Check for rightly dirs AC_CONFIG_SRCDIR([src/main.c])
--- a/src/layout.c Tue Feb 14 13:07:07 2017 +0000 +++ b/src/layout.c Wed Feb 15 23:40:03 2017 +0100 @@ -1742,7 +1742,7 @@ void layout_toolbar_toggle(LayoutWindow *lw) { if (!layout_valid(&lw)) return; - if (!lw->toolbar) return; + if (!lw->toolbar[TOOLBAR_MAIN]) return; lw->options.toolbar_hidden = !lw->options.toolbar_hidden; @@ -2139,8 +2139,8 @@ layout_config_parse(lw->options.style, lw->options.order, &lw->dir_location, &lw->file_location, &lw->image_location); - if (lw->options.dir_view_type >= VIEW_DIR_TYPES_COUNT) lw->options.dir_view_type = 0; - if (lw->options.file_view_type >= VIEW_FILE_TYPES_COUNT) lw->options.file_view_type = 0; + if (lw->options.dir_view_type > DIRVIEW_LAST) lw->options.dir_view_type = 0; + if (lw->options.file_view_type > FILEVIEW_LAST) lw->options.file_view_type = 0; /* divider positions */
--- a/src/layout_util.c Tue Feb 14 13:07:07 2017 +0000 +++ b/src/layout_util.c Wed Feb 15 23:40:03 2017 +0100 @@ -2176,7 +2176,7 @@ menu_split_radio_entries, G_N_ELEMENTS(menu_split_radio_entries), 0, G_CALLBACK(layout_menu_split_cb), lw); gtk_action_group_add_radio_actions(lw->action_group, - menu_view_dir_radio_entries, VIEW_DIR_TYPES_COUNT, + menu_view_dir_radio_entries, DIRVIEW_LAST + 1 /* count */, 0, G_CALLBACK(layout_menu_view_dir_as_cb), lw); gtk_action_group_add_radio_actions(lw->action_group, menu_color_radio_entries, COLOR_PROFILE_FILE + COLOR_PROFILE_INPUTS,
--- a/src/preferences.c Tue Feb 14 13:07:07 2017 +0000 +++ b/src/preferences.c Wed Feb 15 23:40:03 2017 +0100 @@ -1973,7 +1973,7 @@ } static void add_intent_menu(GtkWidget *table, gint column, gint row, const gchar *text, - guint option, guint *option_c) + gint option, gint *option_c) { GtkWidget *combo; gint current = 0;
--- a/src/typedefs.h Tue Feb 14 13:07:07 2017 +0000 +++ b/src/typedefs.h Wed Feb 15 23:40:03 2017 +0100 @@ -38,12 +38,18 @@ typedef enum { DIRVIEW_LIST, - DIRVIEW_TREE + DIRVIEW_TREE, + + // Keep this up to date! + DIRVIEW_LAST = DIRVIEW_TREE } DirViewType; typedef enum { FILEVIEW_LIST, - FILEVIEW_ICON + FILEVIEW_ICON, + + // Keep this up to date! + FILEVIEW_LAST = FILEVIEW_ICON } FileViewType; #define CMD_COPY "geeqie-copy-command.desktop"
--- a/src/view_dir.h Tue Feb 14 13:07:07 2017 +0000 +++ b/src/view_dir.h Wed Feb 15 23:40:03 2017 +0100 @@ -30,8 +30,6 @@ DIR_COLUMN_COUNT }; -#define VIEW_DIR_TYPES_COUNT 2 - ViewDir *vd_new(DirViewType type, FileData *dir_fd); void vd_set_select_func(ViewDir *vdl, void (*func)(ViewDir *vdl, FileData *fd, gpointer data), gpointer data);
--- a/src/view_file.h Tue Feb 14 13:07:07 2017 +0000 +++ b/src/view_file.h Wed Feb 15 23:40:03 2017 +0100 @@ -21,8 +21,6 @@ #ifndef VIEW_FILE_H #define VIEW_FILE_H -#define VIEW_FILE_TYPES_COUNT 2 - #define VFLIST(_vf_) ((ViewFileInfoList *)(_vf_->info)) #define VFICON(_vf_) ((ViewFileInfoIcon *)(_vf_->info))