diff options
author | Pablo Barciela <[email protected]> | 2019-03-15 05:10:07 +0100 |
---|---|---|
committer | ZenWalker <[email protected]> | 2019-04-14 03:00:04 +0200 |
commit | 3f597e10f76d7fb2a1d70bfdd86275cd737c3f96 (patch) | |
tree | 78122d67a4c684ac9b8fb50c0bf912e84851a538 /libcaja-private | |
parent | 857eda84cab854b949eca40f7ace78d0a7f63d11 (diff) | |
download | caja-3f597e10f76d7fb2a1d70bfdd86275cd737c3f96.tar.bz2 caja-3f597e10f76d7fb2a1d70bfdd86275cd737c3f96.tar.xz |
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);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Diffstat (limited to 'libcaja-private')
-rw-r--r-- | libcaja-private/caja-file-utilities.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |