Task #90960 - fixed.err

back to task #90960
download
Error: GCC_ANALYZER_WARNING (CWE-401):
gnome-menus-3.36.0/libmenu/entry-directories.c:596:7: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dirname)’
gnome-menus-3.36.0/libmenu/entry-directories.c:606:1: enter_function: entry to ‘cached_dir_load_entries_recursive’
gnome-menus-3.36.0/libmenu/entry-directories.c:622:8: acquire_memory: allocated here
gnome-menus-3.36.0/libmenu/entry-directories.c:623:6: branch_false: following ‘false’ branch...
gnome-menus-3.36.0/libmenu/entry-directories.c:630:3: branch_false: ...to here
gnome-menus-3.36.0/libmenu/entry-directories.c:630:3: call_function: calling ‘cached_dir_ensure_monitor’ from ‘cached_dir_load_entries_recursive’
#  594|                              const char *dirname)
#  595|   {
#  596|->   if (dir->dir_monitor == NULL)
#  597|       {
#  598|         dir->dir_monitor = menu_get_directory_monitor (dirname);

Error: COMPILER_WARNING (CWE-704):
gnome-menus-3.36.0/libmenu/gmenu-tree.c: scope_hint: In function ‘find_path’
gnome-menus-3.36.0/libmenu/gmenu-tree.c:775:9: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  775 |   slash = strchr (path, G_DIR_SEPARATOR);
#      |         ^
#  773|   
#  774|     freeme = NULL;
#  775|->   slash = strchr (path, G_DIR_SEPARATOR);
#  776|     if (slash)
#  777|       {

Error: COMPILER_WARNING (CWE-704):
gnome-menus-3.36.0/libmenu/gmenu-tree.c:775:9: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  773|   
#  774|     freeme = NULL;
#  775|->   slash = strchr (path, G_DIR_SEPARATOR);
#  776|     if (slash)
#  777|       {

Error: GCC_ANALYZER_WARNING (CWE-404):
gnome-menus-3.36.0/libmenu/menu-layout.c:1162:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
gnome-menus-3.36.0/libmenu/menu-layout.c:2060:1: enter_function: entry to ‘end_element_handler’
gnome-menus-3.36.0/libmenu/menu-layout.c:2082:10: branch_true: following ‘true’ branch...
gnome-menus-3.36.0/libmenu/menu-layout.c:2085:22: branch_true: ...to here
gnome-menus-3.36.0/libmenu/menu-layout.c:2084:11: call_function: calling ‘set_error’ from ‘end_element_handler’
# 1160|   
# 1161|     va_start (args, format);
# 1162|->   str = g_strdup_vprintf (format, args);
# 1163|     va_end (args);
# 1164|   

Error: COMPILER_WARNING (CWE-252):
gnome-menus-3.36.0/libmenu/menu-layout.c:2313:3: warning[-Wunused-result]: ignoring return value of ‘g_string_free_and_steal’ declared with attribute ‘[warn_unused_result](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-warn_005funused_005fresult-function-attribute)’
# 2311|     menu_verbose ("Set menu name \"%s\"\n", root->name);
# 2312|   
# 2313|->   g_string_free (str, FALSE);
# 2314|     g_free (s);
# 2315|