diff options
author | Pablo Barciela <[email protected]> | 2019-03-15 16:26:51 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2022-07-19 23:34:10 +0200 |
commit | 1f2fb73be707d951078cfc8d3a64623cbaf53456 (patch) | |
tree | 58a7f769facb2aafceedcd78c6398acd5d4d188f | |
parent | f9da15db10e31c9e1569c105adc29cf80aaf4811 (diff) | |
download | caja-1f2fb73be707d951078cfc8d3a64623cbaf53456.tar.bz2 caja-1f2fb73be707d951078cfc8d3a64623cbaf53456.tar.xz |
caja-property-browser: Fix cast from non-struct type to struct type
Fixes Clang static analyzer warnings:
caja-property-browser.c:1242:45: warning: Casting a non-structure type to a structure type and accessing a field can lead to memory access errors or data corruption
CajaPropertyBrowser *property_browser = CAJA_PROPERTY_BROWSER (data);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
caja-property-browser.c:1414:45: warning: Casting a non-structure type to a structure type and accessing a field can lead to memory access errors or data corruption
CajaPropertyBrowser *property_browser = CAJA_PROPERTY_BROWSER (data);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
caja-property-browser.c:1450:45: warning: Casting a non-structure type to a structure type and accessing a field can lead to memory access errors or data corruption
CajaPropertyBrowser *property_browser = CAJA_PROPERTY_BROWSER(data);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
-rw-r--r-- | src/caja-property-browser.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/caja-property-browser.c b/src/caja-property-browser.c index bc5d1d22..bd064945 100644 --- a/src/caja-property-browser.c +++ b/src/caja-property-browser.c @@ -1235,7 +1235,7 @@ caja_color_selection_dialog_new (CajaPropertyBrowser *property_browser) /* add the newly selected file to the browser images */ static void -add_pattern_to_browser (GtkDialog *dialog, gint response_id, gpointer *data) +add_pattern_to_browser (GtkDialog *dialog, gint response_id, gpointer data) { char *directory_path, *destination_name; char *basename; @@ -1408,7 +1408,7 @@ add_color_to_file (CajaPropertyBrowser *property_browser, const char *color_spec /* handle the OK button being pushed on the color selection dialog */ static void -add_color_to_browser (GtkWidget *widget, gint which_button, gpointer *data) +add_color_to_browser (GtkWidget *widget, gint which_button, gpointer data) { char * color_spec; const char *color_name; @@ -1447,10 +1447,10 @@ add_color_to_browser (GtkWidget *widget, gint which_button, gpointer *data) /* create the color selection dialog, pre-set with the color that was just selected */ static void -show_color_selection_window (GtkWidget *widget, gpointer *data) +show_color_selection_window (GtkWidget *widget, gpointer data) { GdkColor color; - CajaPropertyBrowser *property_browser = CAJA_PROPERTY_BROWSER(data); + CajaPropertyBrowser *property_browser = CAJA_PROPERTY_BROWSER (data); gtk_color_selection_get_current_color (GTK_COLOR_SELECTION (gtk_color_selection_dialog_get_color_selection (GTK_COLOR_SELECTION_DIALOG (property_browser->details->colors_dialog))), |