Task #1742 - added.err
back to task #1742download
Error: GCC_ANALYZER_WARNING (CWE-401): util-linux-2.40/misc-utils/uuidgen.c:22: included_from: Included from here. util-linux-2.40/include/xalloc.h: scope_hint: In function ‘unhex’ util-linux-2.40/include/xalloc.h:33:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc((*valuelen >> 1) + 1)’ # 31| void *ret = malloc(size); # 32| # 33|-> if (!ret && size) # 34| err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size); # 35| return ret; Error: GCC_ANALYZER_WARNING (CWE-476): util-linux-2.40/misc-utils/hardlink.c: scope_hint: In function ‘get_sorted_xattr_name_table’ util-linux-2.40/misc-utils/hardlink.c:515:26: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xmalloc((long unsigned int)n * 8)’ util-linux-2.40/misc-utils/hardlink.c: scope_hint: In function ‘get_sorted_xattr_name_table’ # 513| # 514| for (i = 0; i < n; i++) { # 515|-> table[i] = names; # 516| names += strlen(names) + 1; # 517| } Error: CLANG_WARNING: util-linux-2.40/misc-utils/lslocks.c:244:7: warning[deadcode.DeadStores]: Although the value stored to 'sz' is used in the enclosing expression, the value is never actually read from 'sz' # 242| return NULL; # 243| # 244|-> if ((sz = strlen(path)) >= (sizeof(path) - 2)) # 245| goto out; # 246| Error: GCC_ANALYZER_WARNING (CWE-476): util-linux-2.40/misc-utils/waitpid.c: scope_hint: In function ‘parse_pids’ util-linux-2.40/misc-utils/waitpid.c:54:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘xcalloc(n_strings, 4)’ util-linux-2.40/include/strutils.h:51:64: note: in definition of macro ‘strtopid_or_err’ util-linux-2.40/misc-utils/waitpid.c:54:55: note: in expansion of macro ‘_’ # 52| # 53| for (size_t i = 0; i < n_strings; i++) # 54|-> pids[i] = strtopid_or_err(strings[i], _("failed to parse pid")); # 55| # 56| return pids; Error: GCC_ANALYZER_WARNING (CWE-476): util-linux-2.40/misc-utils/waitpid.c: scope_hint: In function ‘open_pidfds’ util-linux-2.40/misc-utils/waitpid.c:64:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘xcalloc(n_pids, 4) + i * 4’ util-linux-2.40/include/strutils.h:51:64: note: in definition of macro ‘strtopid_or_err’ util-linux-2.40/misc-utils/waitpid.c:54:55: note: in expansion of macro ‘_’ # 62| # 63| for (size_t i = 0; i < n_pids; i++) { # 64|-> pidfds[i] = pidfd_open(pids[i], 0); # 65| if (pidfds[i] == -1) { # 66| if (allow_exited && errno == ESRCH) { Error: CLANG_WARNING: util-linux-2.40/text-utils/more.c:1065:14: warning[core.UndefinedBinaryOperatorResult]: The left operand of '<' is a garbage value # 1063| } # 1064| # 1065|-> if ((*sp < ' ' && *sp != '\n') || *sp == CERASE) { # 1066| --ctl->prompt_len; # 1067| erase_one_column(ctl);