From: Colin Clark Date: Tue, 6 Feb 2024 11:48:56 +0000 (+0000) Subject: clang-tidy: readability-suspicious-call-argument X-Git-Tag: v2.3~44 X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=commitdiff_plain;h=00f26483b98a433f1c5728795a609a9c61964f14 clang-tidy: readability-suspicious-call-argument - Fix warnings identified by this flag - Remove the exclude from .clang-tidy file --- diff --git a/.clang-tidy b/.clang-tidy index fda57e8c..8a71f20e 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -54,7 +54,6 @@ Checks: > -readability-named-parameter, -readability-qualified-auto, -readability-simplify-boolean-expr, - -readability-suspicious-call-argument, -readability-uppercase-literal-suffix diff --git a/src/pan-view/pan-view.cc b/src/pan-view/pan-view.cc index 141944f9..0e2482fe 100644 --- a/src/pan-view/pan-view.cc +++ b/src/pan-view/pan-view.cc @@ -2007,7 +2007,7 @@ static gboolean pan_warning(FileData *dir_fd) GenericDialog *gd; GtkWidget *box; GtkWidget *group; - GtkWidget *button; + GtkWidget *checkbox; GtkWidget *ct_button; gboolean hide_dlg; @@ -2039,9 +2039,9 @@ static gboolean pan_warning(FileData *dir_fd) ct_button = pref_checkbox_new_int(group, _("Cache thumbnails"), options->thumbnails.enable_caching, &options->thumbnails.enable_caching); - button = pref_checkbox_new_int(group, _("Use shared thumbnail cache"), + checkbox = pref_checkbox_new_int(group, _("Use shared thumbnail cache"), options->thumbnails.spec_standard, &options->thumbnails.spec_standard); - pref_checkbox_link_sensitivity(ct_button, button); + pref_checkbox_link_sensitivity(ct_button, checkbox); pref_line(box, 0); diff --git a/src/preferences.cc b/src/preferences.cc index ce9b73d6..6470c6ea 100644 --- a/src/preferences.cc +++ b/src/preferences.cc @@ -2395,6 +2395,7 @@ static void config_tab_windows(GtkWidget *notebook) GtkWidget *group; GtkWidget *subgroup; GtkWidget *button; + GtkWidget *checkbox; GtkWidget *ct_button; GtkWidget *spin; @@ -2405,13 +2406,13 @@ static void config_tab_windows(GtkWidget *notebook) ct_button = pref_checkbox_new_int(group, _("Remember session"), options->save_window_positions, &c_options->save_window_positions); - button = pref_checkbox_new_int(group, _("Use saved window positions also for new windows"), + checkbox = pref_checkbox_new_int(group, _("Use saved window positions also for new windows"), options->use_saved_window_positions_for_new_windows, &c_options->use_saved_window_positions_for_new_windows); - pref_checkbox_link_sensitivity(ct_button, button); + pref_checkbox_link_sensitivity(ct_button, checkbox); - button = pref_checkbox_new_int(group, _("Remember window workspace"), + checkbox = pref_checkbox_new_int(group, _("Remember window workspace"), options->save_window_workspace, &c_options->save_window_workspace); - pref_checkbox_link_sensitivity(ct_button, button); + pref_checkbox_link_sensitivity(ct_button, checkbox); pref_checkbox_new_int(group, _("Remember tool state (float/hidden)"), options->tools_restore_state, &c_options->tools_restore_state);