clang-tidy: readability-suspicious-call-argument
authorColin Clark <colin.clark@cclark.uk>
Tue, 6 Feb 2024 11:48:56 +0000 (11:48 +0000)
committerColin Clark <colin.clark@cclark.uk>
Tue, 6 Feb 2024 11:48:56 +0000 (11:48 +0000)
- Fix warnings identified by this flag
- Remove the exclude from .clang-tidy file

.clang-tidy
src/pan-view/pan-view.cc
src/preferences.cc

index fda57e8..8a71f20 100644 (file)
@@ -54,7 +54,6 @@ Checks: >
   -readability-named-parameter,
   -readability-qualified-auto,
   -readability-simplify-boolean-expr,
-  -readability-suspicious-call-argument,
   -readability-uppercase-literal-suffix
 
 
index 141944f..0e2482f 100644 (file)
@@ -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);
 
index ce9b73d..6470c6e 100644 (file)
@@ -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);