From 3f597e10f76d7fb2a1d70bfdd86275cd737c3f96 Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Fri, 15 Mar 2019 05:10:07 +0100 Subject: caja-file-utilities: Fix cast from non-struct type to struct type Fixes Clang static analyzer warning: caja-file-utilities.c:283:12: warning: Casting a non-structure type to a structure type and accessing a field can lead to memory access errors or data corruption return (XdgDirEntry *)g_array_free (array, FALSE); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- libcaja-private/caja-file-utilities.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcaja-private/caja-file-utilities.c b/libcaja-private/caja-file-utilities.c index 2b4914be..925c08f2 100644 --- a/libcaja-private/caja-file-utilities.c +++ b/libcaja-private/caja-file-utilities.c @@ -281,7 +281,7 @@ parse_xdg_dirs (const char *config_file) g_free (config_file_free); - return (XdgDirEntry *)g_array_free (array, FALSE); + return (XdgDirEntry *) (gpointer) g_array_free (array, FALSE); } static XdgDirEntry *cached_xdg_dirs = NULL; -- cgit v1.2.1