Task #1072 - fixed.err
back to task #1072download
Error: GCC_ANALYZER_WARNING (CWE-775):
power-profiles-daemon-0.20-build/power-profiles-daemon-0.20/src/ppd-utils.c: scope_hint: In function ‘ppd_utils_write’
power-profiles-daemon-0.20-build/power-profiles-daemon-0.20/src/ppd-utils.c:50:6: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "w")’
/usr/lib64/glib-2.0/include/glibconfig.h:9: included_from: Included from here.
/usr/include/glib-2.0/glib/gtypes.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib/galloca.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib.h:32: included_from: Included from here.
/usr/include/glib-2.0/gobject/gbinding.h:30: included_from: Included from here.
/usr/include/glib-2.0/glib-object.h:24: included_from: Included from here.
/usr/include/gudev-1.0/gudev/gudevenums.h:14: included_from: Included from here.
/usr/include/gudev-1.0/gudev/gudev.h:11: included_from: Included from here.
power-profiles-daemon-0.20-build/power-profiles-daemon-0.20/src/ppd-utils.h:12: included_from: Included from here.
power-profiles-daemon-0.20-build/power-profiles-daemon-0.20/src/ppd-utils.c:12: included_from: Included from here.
/usr/include/glib-2.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
power-profiles-daemon-0.20-build/power-profiles-daemon-0.20/src/ppd-utils.c:36:3: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
power-profiles-daemon-0.20-build/power-profiles-daemon-0.20/src/ppd-utils.c:37:3: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
power-profiles-daemon-0.20-build/power-profiles-daemon-0.20/src/ppd-utils.c:37:3: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/glib.h:64: included_from: Included from here.
power-profiles-daemon-0.20-build/power-profiles-daemon-0.20/src/ppd-utils.c:39:3: note: in expansion of macro ‘g_debug’
# 48| setbuf (sysfsfp, NULL);
# 49| ret = fprintf (sysfsfp, "%s", value);
# 50|-> if (ret <= 0) {
# 51| g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errno),
# 52| "Error writing '%s': %s", filename, g_strerror (errno));
Error: GCC_ANALYZER_WARNING (CWE-401):
power-profiles-daemon-0.20-build/power-profiles-daemon-0.20/src/ppd-utils.c:50:6: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "w")’
/usr/include/glib-2.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
power-profiles-daemon-0.20-build/power-profiles-daemon-0.20/src/ppd-utils.c:36:3: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
power-profiles-daemon-0.20-build/power-profiles-daemon-0.20/src/ppd-utils.c:37:3: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
power-profiles-daemon-0.20-build/power-profiles-daemon-0.20/src/ppd-utils.c:37:3: note: in expansion of macro ‘g_return_val_if_fail’
power-profiles-daemon-0.20-build/power-profiles-daemon-0.20/src/ppd-utils.c:39:3: note: in expansion of macro ‘g_debug’
# 48| setbuf (sysfsfp, NULL);
# 49| ret = fprintf (sysfsfp, "%s", value);
# 50|-> if (ret <= 0) {
# 51| g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errno),
# 52| "Error writing '%s': %s", filename, g_strerror (errno));