Task #131764 - fixed.err
back to task #131764download
Error: COMPILER_WARNING (CWE-704):
libsolv-0.7.36/ext/solv_xfopen.c: scope_hint: In function ‘solv_xfopen’
libsolv-0.7.36/ext/solv_xfopen.c:670:7: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 670 | suf = strrchr(fn, '.');
# | ^
# 668| if (!mode)
# 669| mode = "r";
# 670|-> suf = strrchr(fn, '.');
# 671| #ifdef ENABLE_ZLIB_COMPRESSION
# 672| if (suf && !strcmp(suf, ".gz"))
Error: COMPILER_WARNING (CWE-704):
libsolv-0.7.36/ext/solv_xfopen.c:670:7: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 668| if (!mode)
# 669| mode = "r";
# 670|-> suf = strrchr(fn, '.');
# 671| #ifdef ENABLE_ZLIB_COMPRESSION
# 672| if (suf && !strcmp(suf, ".gz"))
Error: COMPILER_WARNING (CWE-704):
libsolv-0.7.36/ext/solv_xfopen.c: scope_hint: In function ‘solv_xfopen_fd’
libsolv-0.7.36/ext/solv_xfopen.c:737:7: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 737 | suf = fn ? strrchr(fn, '.') : 0;
# | ^
# 735| char *suf;
# 736|
# 737|-> suf = fn ? strrchr(fn, '.') : 0;
# 738| if (!mode)
# 739| {
Error: COMPILER_WARNING (CWE-704):
libsolv-0.7.36/ext/solv_xfopen.c:737:7: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 735| char *suf;
# 736|
# 737|-> suf = fn ? strrchr(fn, '.') : 0;
# 738| if (!mode)
# 739| {
Error: GCC_ANALYZER_WARNING (CWE-688):
libsolv-0.7.36/src/chksum.c:280:10: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
libsolv-0.7.36/src/chksum.c:270:1: enter_function: entry to ‘solv_chksum_cmp’
libsolv-0.7.36/src/chksum.c:274:6: branch_false: following ‘false’ branch (when ‘chk != chk2’)...
libsolv-0.7.36/src/chksum.c:276:7: branch_false: ...to here
libsolv-0.7.36/src/chksum.c:276:6: branch_false: following ‘false’ branch...
libsolv-0.7.36/src/chksum.c:278:10: call_function: calling ‘solv_chksum_get’ from ‘solv_chksum_cmp’
libsolv-0.7.36/src/chksum.c:278:10: return_function: returning to ‘solv_chksum_cmp’ from ‘solv_chksum_get’
libsolv-0.7.36/src/chksum.c:279:10: call_function: calling ‘solv_chksum_get’ from ‘solv_chksum_cmp’
libsolv-0.7.36/src/chksum.c:279:10: return_function: returning to ‘solv_chksum_cmp’ from ‘solv_chksum_get’
libsolv-0.7.36/src/chksum.c:280:10: danger: argument 2 (‘solv_chksum_get(chk2, 0)’) NULL where non-null expected
# 278| res1 = solv_chksum_get(chk, &len);
# 279| res2 = solv_chksum_get(chk2, 0);
# 280|-> return memcmp(res1, res2, len) == 0 ? 1 : 0;
# 281| }
Error: GCC_ANALYZER_WARNING (CWE-476):
libsolv-0.7.36/src/dirpool.c:93:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libsolv-0.7.36/src/dirpool.c:81:1: enter_function: entry to ‘dirpool_make_dirtraverse’
libsolv-0.7.36/src/dirpool.c:84:6: branch_false: following ‘false’ branch...
libsolv-0.7.36/src/dirpool.c:86:14: branch_false: ...to here
libsolv-0.7.36/src/dirpool.c:87:17: call_function: calling ‘solv_calloc_block’ from ‘dirpool_make_dirtraverse’
libsolv-0.7.36/src/dirpool.c:87:17: return_function: returning to ‘dirpool_make_dirtraverse’ from ‘solv_calloc_block’
libsolv-0.7.36/src/dirpool.c:88:15: branch_true: following ‘true’ branch...
libsolv-0.7.36/src/dirpool.c:90:11: branch_true: ...to here
libsolv-0.7.36/src/dirpool.c:90:10: branch_false: following ‘false’ branch...
libsolv-0.7.36/src/dirpool.c:92:7: branch_false: ...to here
libsolv-0.7.36/src/dirpool.c:93:7: danger: dereference of NULL ‘solv_calloc_block((long unsigned int)*dp.ndirs, 4, 127) + (long unsigned int)i * 4’
# 91| continue;
# 92| parent = -dp->dirs[i];
# 93|-> dirtraverse[i] = dirtraverse[parent];
# 94| dirtraverse[parent] = i + 1;
# 95| }
Error: GCC_ANALYZER_WARNING (CWE-688):
libsolv-0.7.36/src/pool.c:566:9: warning[-Wanalyzer-null-argument]: use of NULL ‘str’ where non-null expected
libsolv-0.7.36/src/pool.c:549:1: enter_function: entry to ‘pool_tmpappend’
libsolv-0.7.36/src/pool.c:554:3: branch_true: following ‘true’ branch (when ‘str1’ is non-NULL)...
libsolv-0.7.36/src/pool.c:554:15: branch_true: ...to here
libsolv-0.7.36/src/pool.c:555:3: branch_false: following ‘false’ branch (when ‘str2’ is NULL)...
libsolv-0.7.36/src/pool.c:556:3: branch_false: ...to here
libsolv-0.7.36/src/pool.c:556:3: branch_false: following ‘false’ branch (when ‘str3’ is NULL)...
libsolv-0.7.36/src/pool.c:557:45: branch_false: ...to here
libsolv-0.7.36/src/pool.c:557:9: call_function: calling ‘pool_alloctmpspace_free’ from ‘pool_tmpappend’
libsolv-0.7.36/src/pool.c:557:9: return_function: returning to ‘pool_tmpappend’ from ‘pool_alloctmpspace_free’
libsolv-0.7.36/src/pool.c:558:6: branch_false: following ‘false’ branch...
libsolv-0.7.36/src/pool.c:561:11: branch_false: ...to here
libsolv-0.7.36/src/pool.c:561:11: call_function: calling ‘pool_alloctmpspace’ from ‘pool_tmpappend’
libsolv-0.7.36/src/pool.c:561:11: return_function: returning to ‘pool_tmpappend’ from ‘pool_alloctmpspace’
libsolv-0.7.36/src/pool.c:563:6: branch_true: following ‘true’ branch (when ‘l1 != 0’)...
libsolv-0.7.36/src/pool.c:565:10: branch_true: ...to here
libsolv-0.7.36/src/pool.c:565:10: branch_true: following ‘true’ branch (when ‘str1 != str’)...
libsolv-0.7.36/src/pool.c:566:9: branch_true: ...to here
libsolv-0.7.36/src/pool.c:566:9: danger: argument 1 (‘str’) NULL where non-null expected
# 564| {
# 565| if (s != str1)
# 566|-> strcpy(s, str1);
# 567| s += l1;
# 568| }
Error: GCC_ANALYZER_WARNING (CWE-688):
libsolv-0.7.36/src/pool.c:571:7: warning[-Wanalyzer-null-argument]: use of NULL ‘s’ where non-null expected
libsolv-0.7.36/src/pool.c:549:1: enter_function: entry to ‘pool_tmpappend’
libsolv-0.7.36/src/pool.c:555:3: branch_true: following ‘true’ branch (when ‘str2’ is non-NULL)...
libsolv-0.7.36/src/pool.c:555:15: branch_true: ...to here
libsolv-0.7.36/src/pool.c:556:3: branch_false: following ‘false’ branch (when ‘str3’ is NULL)...
libsolv-0.7.36/src/pool.c:557:45: branch_false: ...to here
libsolv-0.7.36/src/pool.c:557:9: call_function: calling ‘pool_alloctmpspace_free’ from ‘pool_tmpappend’
libsolv-0.7.36/src/pool.c:557:9: return_function: returning to ‘pool_tmpappend’ from ‘pool_alloctmpspace_free’
libsolv-0.7.36/src/pool.c:558:6: branch_false: following ‘false’ branch...
libsolv-0.7.36/src/pool.c:561:11: branch_false: ...to here
libsolv-0.7.36/src/pool.c:561:11: call_function: calling ‘pool_alloctmpspace’ from ‘pool_tmpappend’
libsolv-0.7.36/src/pool.c:561:11: return_function: returning to ‘pool_tmpappend’ from ‘pool_alloctmpspace’
libsolv-0.7.36/src/pool.c:563:6: branch_false: following ‘false’ branch (when ‘l1 == 0’)...
libsolv-0.7.36/src/pool.c:569:6: branch_false: ...to here
libsolv-0.7.36/src/pool.c:569:6: branch_true: following ‘true’ branch (when ‘l2 != 0’)...
libsolv-0.7.36/src/pool.c:571:7: branch_true: ...to here
libsolv-0.7.36/src/pool.c:571:7: danger: argument 1 (‘s’) NULL where non-null expected
# 569| if (l2)
# 570| {
# 571|-> strcpy(s, str2);
# 572| s += l2;
# 573| }
Error: COMPILER_WARNING (CWE-704):
libsolv-0.7.36/src/selection.c: scope_hint: In function ‘selection_name_arch_rel’
libsolv-0.7.36/src/selection.c:907:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 907 | if ((r = strpbrk(name, "<=>")) != 0)
# | ^
# 905| if ((flags & SELECTION_REL) != 0)
# 906| {
# 907|-> if ((r = strpbrk(name, "<=>")) != 0)
# 908| {
# 909| rname = solv_strdup(name);
Error: COMPILER_WARNING (CWE-704):
libsolv-0.7.36/src/selection.c:907:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 905| if ((flags & SELECTION_REL) != 0)
# 906| {
# 907|-> if ((r = strpbrk(name, "<=>")) != 0)
# 908| {
# 909| rname = solv_strdup(name);
Error: COMPILER_WARNING (CWE-704):
libsolv-0.7.36/src/selection.c: scope_hint: In function ‘selection_canon’
libsolv-0.7.36/src/selection.c:1175:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1175 | if ((r = strchr(name, '_')) == 0)
# | ^
# 1173| if (pool->disttype == DISTTYPE_DEB)
# 1174| {
# 1175|-> if ((r = strchr(name, '_')) == 0)
# 1176| return 0;
# 1177| rname = solv_strdup(name); /* so we can modify it */
Error: COMPILER_WARNING (CWE-704):
libsolv-0.7.36/src/selection.c:1175:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1173| if (pool->disttype == DISTTYPE_DEB)
# 1174| {
# 1175|-> if ((r = strchr(name, '_')) == 0)
# 1176| return 0;
# 1177| rname = solv_strdup(name); /* so we can modify it */
Error: COMPILER_WARNING (CWE-704):
libsolv-0.7.36/src/selection.c:1198:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1198 | if ((r = strchr(name, '-')) == 0)
# | ^
# 1196| if (pool->disttype == DISTTYPE_HAIKU)
# 1197| {
# 1198|-> if ((r = strchr(name, '-')) == 0)
# 1199| return 0;
# 1200| rname = solv_strdup(name); /* so we can modify it */
Error: COMPILER_WARNING (CWE-704):
libsolv-0.7.36/src/selection.c:1198:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1196| if (pool->disttype == DISTTYPE_HAIKU)
# 1197| {
# 1198|-> if ((r = strchr(name, '-')) == 0)
# 1199| return 0;
# 1200| rname = solv_strdup(name); /* so we can modify it */
Error: COMPILER_WARNING (CWE-704):
libsolv-0.7.36/src/selection.c:1219:10: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1219 | if ((r = strrchr(name, '-')) == 0)
# | ^
# 1217| }
# 1218|
# 1219|-> if ((r = strrchr(name, '-')) == 0)
# 1220| return 0;
# 1221| rname = solv_strdup(name); /* so we can modify it */
Error: COMPILER_WARNING (CWE-704):
libsolv-0.7.36/src/selection.c:1219:10: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1217| }
# 1218|
# 1219|-> if ((r = strrchr(name, '-')) == 0)
# 1220| return 0;
# 1221| rname = solv_strdup(name); /* so we can modify it */
Error: COMPILER_WARNING (CWE-704):
libsolv-0.7.36/src/suse.c: scope_hint: In function ‘repo_fix_supplements’
libsolv-0.7.36/src/suse.c:166:23: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 166 | else if ((p = strchr(dep, ':')) != 0 && p != dep && p[1] == '/' && strlen(dep) < sizeof(buf))
# | ^
# 164| supplements = repo_addid_dep(repo, supplements, id, 0);
# 165| }
# 166|-> else if ((p = strchr(dep, ':')) != 0 && p != dep && p[1] == '/' && strlen(dep) < sizeof(buf))
# 167| {
# 168| strcpy(buf, dep);
Error: COMPILER_WARNING (CWE-704):
libsolv-0.7.36/src/suse.c:166:23: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 164| supplements = repo_addid_dep(repo, supplements, id, 0);
# 165| }
# 166|-> else if ((p = strchr(dep, ':')) != 0 && p != dep && p[1] == '/' && strlen(dep) < sizeof(buf))
# 167| {
# 168| strcpy(buf, dep);