Task #94413 - fixed.err

back to task #94413
download
Error: COMPILER_WARNING (CWE-252):
sssd-2.13.0/src/providers/ipa/selinux_child.c: scope_hint: In function ‘main’
sssd-2.13.0/src/providers/ipa/selinux_child.c:330:9: warning[-Wunused-result]: ignoring return value of ‘setresuid’ declared with attribute ‘warn_unused_result’
#  330 |         setresuid(suid, suid, suid);
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
#  328|   
#  329|       if (getresuid(&ruid, &euid, &suid) == 0) {
#  330|->         setresuid(suid, suid, suid);
#  331|       }
#  332|       if (getresgid(&rgid, &egid, &sgid) == 0) {

Error: COMPILER_WARNING (CWE-252):
sssd-2.13.0/src/providers/ipa/selinux_child.c:333:9: warning[-Wunused-result]: ignoring return value of ‘setresgid’ declared with attribute ‘warn_unused_result’
#  333 |         setresgid(sgid, sgid, sgid);
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
#  331|       }
#  332|       if (getresgid(&rgid, &egid, &sgid) == 0) {
#  333|->         setresgid(sgid, sgid, sgid);
#  334|       }
#  335|   

Error: GCC_ANALYZER_WARNING (CWE-404):
sssd-2.13.0/src/providers/ipa/selinux_child_semanage.c: scope_hint: In function ‘sss_semanage_error_callback’
sssd-2.13.0/src/providers/ipa/selinux_child_semanage.c:54:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
#   52|   
#   53|       va_start(ap, fmt);
#   54|->     sss_vdebug_fn(__FILE__, __LINE__, "libsemanage", level,
#   55|                     APPEND_LINE_FEED, fmt, ap);
#   56|       va_end(ap);

Error: GCC_ANALYZER_WARNING (CWE-775):
sssd-2.13.0/src/util/util.h:54: included_from: Included from here.
sssd-2.13.0/src/providers/be_netlink.c:37: included_from: Included from here.
sssd-2.13.0/src/providers/be_netlink.c: scope_hint: In function ‘has_ethernet_encapsulation’
sssd-2.13.0/src/util/atomic_io.h:37:40: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&type_path, 0)’
sssd-2.13.0/src/providers/be_netlink.c:201:11: note: in expansion of macro ‘sss_atomic_read_s’
sssd-2.13.0/src/util/atomic_io.h:27: included_from: Included from here.
sssd-2.13.0/src/providers/be_netlink.c:201:11: note: in expansion of macro ‘sss_atomic_read_s’
sssd-2.13.0/src/providers/be_netlink.c:201:11: note: in expansion of macro ‘sss_atomic_read_s’
#   35|   ssize_t sss_atomic_io_s(int fd, void *buf, size_t n, bool do_read);
#   36|   
#   37|-> #define sss_atomic_read_s(fd, buf, n)  sss_atomic_io_s(fd, buf, n, true)
#   38|   #define sss_atomic_write_s(fd, buf, n) sss_atomic_io_s(fd, buf, n, false)
#   39|   

Error: GCC_ANALYZER_WARNING (CWE-404):
sssd-2.13.0/src/util/debug.c: scope_hint: In function 'journal_send'
sssd-2.13.0/src/util/debug.c:248:11: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
sssd-2.13.0/src/util/util.h:58: included_from: Included from here.
sssd-2.13.0/src/util/debug.c:37: included_from: Included from here.
sssd-2.13.0/src/util/debug.c:288:14: note: in expansion of macro 'DEBUG_IS_SET'
#  246|        * source code location and other tracking data.
#  247|        */
#  248|->     res = sd_journal_send_with_location(
#  249|               code_file, code_line, function,
#  250|               "MESSAGE=%s", message,

Error: GCC_ANALYZER_WARNING (CWE-404):
sssd-2.13.0/src/util/debug.c: scope_hint: In function 'sss_vdebug_fn'
sssd-2.13.0/src/util/debug.c:322:13: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
sssd-2.13.0/src/util/debug.c:288:14: note: in expansion of macro 'DEBUG_IS_SET'
#  320|               /* Emergency fallback, send to STDERR */
#  321|               vfprintf(stderr, format, ap_fallback);
#  322|->             fflush(stderr);
#  323|           }
#  324|           va_end(ap_fallback);