Error: COMPILER_WARNING (CWE-704): [#def1] libdrm-2.4.131/amdgpu/amdgpu_asic_id.c: scope_hint: In function ‘find_asic_id_table’ libdrm-2.4.131/amdgpu/amdgpu_asic_id.c:249:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type # 249 | file_name = strrchr(AMDGPU_ASIC_ID_TABLE, '/'); # | ^ # 247| # 248| // extract the file name from AMDGPU_ASIC_ID_TABLE # 249|-> file_name = strrchr(AMDGPU_ASIC_ID_TABLE, '/'); # 250| if (!file_name) # 251| return NULL; Error: COMPILER_WARNING (CWE-704): [#def2] libdrm-2.4.131/tests/modetest/modetest.c: scope_hint: In function ‘parse_connector’ libdrm-2.4.131/tests/modetest/modetest.c:1997:22: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type # 1997 | endp = strpbrk(p, ",@:"); # | ^ # 1995| /* Parse the connectors. */ # 1996| for (i = 0, p = arg; i < pipe->num_cons; ++i, p = endp + 1) { # 1997|-> endp = strpbrk(p, ",@:"); # 1998| if (!endp) # 1999| break; Error: COMPILER_WARNING (CWE-704): [#def3] libdrm-2.4.131/tests/modetest/modetest.c:1997:22: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type # 1995| /* Parse the connectors. */ # 1996| for (i = 0, p = arg; i < pipe->num_cons; ++i, p = endp + 1) { # 1997|-> endp = strpbrk(p, ",@:"); # 1998| if (!endp) # 1999| break; Error: GCC_ANALYZER_WARNING (CWE-401): [#def4] libdrm-2.4.131/tests/modetest/modetest.c:2027:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ libdrm-2.4.131/tests/modetest/modetest.c:2196:5: enter_function: entry to ‘main’ libdrm-2.4.131/tests/modetest/modetest.c:2222:16: branch_true: following ‘true’ branch (when ‘c != -1’)... libdrm-2.4.131/tests/modetest/modetest.c:2223:17: branch_true: ...to here libdrm-2.4.131/tests/modetest/modetest.c:2280:28: branch_false: following ‘false’ branch... libdrm-2.4.131/tests/modetest/modetest.c:2284:42: branch_false: ...to here libdrm-2.4.131/tests/modetest/modetest.c:2286:29: call_function: calling ‘parse_connector’ from ‘main’ # 2025| p = arg + strlen(arg); # 2026| len = min(sizeof pipe->mode_str - 1, (unsigned int)(p - arg)); # 2027|-> strncpy(pipe->mode_str, arg, len); # 2028| pipe->mode_str[len] = '\0'; # 2029| Error: COMPILER_WARNING (CWE-252): [#def5] libdrm-2.4.131/xf86drm.c: scope_hint: In function ‘drmGetFormatModifierNameFromNvidia’ libdrm-2.4.131/xf86drm.c:351:9: warning[-Wunused-result]: ignoring return value of ‘asprintf’ declared with attribute ‘warn_unused_result’ # 351 | asprintf(&mod_nvidia, "BLOCK_LINEAR_2D,HEIGHT=%"PRIu64",KIND=%"PRIu64"," # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 352 | "GEN=%"PRIu64",SECTOR=%"PRIu64",COMPRESSION=%"PRIu64"", height, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 353 | kind, gen, sector, compression); # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 349| if ((modifier & 0x10) == 0x10) { # 350| char *mod_nvidia; # 351|-> asprintf(&mod_nvidia, "BLOCK_LINEAR_2D,HEIGHT=%"PRIu64",KIND=%"PRIu64"," # 352| "GEN=%"PRIu64",SECTOR=%"PRIu64",COMPRESSION=%"PRIu64"", height, # 353| kind, gen, sector, compression); Error: COMPILER_WARNING (CWE-252): [#def6] libdrm-2.4.131/xf86drm.c: scope_hint: In function ‘drmGetFormatModifierNameFromAmlogic’ libdrm-2.4.131/xf86drm.c:545:5: warning[-Wunused-result]: ignoring return value of ‘asprintf’ declared with attribute ‘warn_unused_result’ # 545 | asprintf(&mod_amlogic, "FBC,LAYOUT=%s,OPTIONS=%s", layout_str, opts_str); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 543| opts_str = "0"; # 544| # 545|-> asprintf(&mod_amlogic, "FBC,LAYOUT=%s,OPTIONS=%s", layout_str, opts_str); # 546| return mod_amlogic; # 547| } Error: COMPILER_WARNING (CWE-252): [#def7] libdrm-2.4.131/xf86drm.c: scope_hint: In function ‘drmGetFormatModifierNameFromVivante’ libdrm-2.4.131/xf86drm.c:609:5: warning[-Wunused-result]: ignoring return value of ‘asprintf’ declared with attribute ‘warn_unused_result’ # 609 | asprintf(&mod_vivante, "%s%s%s", color_tiling, tile_status, compression); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 607| } # 608| # 609|-> asprintf(&mod_vivante, "%s%s%s", color_tiling, tile_status, compression); # 610| return mod_vivante; # 611| }
| analyzer-version-clippy | 1.97.1 |
| analyzer-version-cppcheck | 2.21.1 |
| analyzer-version-gcc | 16.1.1 |
| analyzer-version-gcc-analyzer | 16.1.1 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.97.1 |
| diffbase-analyzer-version-cppcheck | 2.21.1 |
| diffbase-analyzer-version-gcc | 16.1.1 |
| diffbase-analyzer-version-gcc-analyzer | 16.1.1 |
| diffbase-analyzer-version-shellcheck | 0.11.0 |
| diffbase-analyzer-version-unicontrol | 0.0.2 |
| diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| diffbase-exit-code | 0 |
| diffbase-host | ip-172-16-1-5.us-west-2.compute.internal |
| diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js |
| diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | libdrm-2.4.134-2.fc45 |
| diffbase-store-results-to | /tmp/tmpx3efz_ln/libdrm-2.4.134-2.fc45.tar.xz |
| diffbase-time-created | 2026-08-03 17:10:03 |
| diffbase-time-finished | 2026-08-03 17:11:36 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpx3efz_ln/libdrm-2.4.134-2.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpx3efz_ln/libdrm-2.4.134-2.fc45.src.rpm' |
| diffbase-tool-version | csmock-3.8.7.20260803.142340.gb75b18e-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-5.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | libdrm-2.4.131-1.fc44 |
| store-results-to | /tmp/tmpfu7py_o0/libdrm-2.4.131-1.fc44.tar.xz |
| time-created | 2026-08-03 17:07:19 |
| time-finished | 2026-08-03 17:09:40 |
| title | Fixed findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpfu7py_o0/libdrm-2.4.131-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpfu7py_o0/libdrm-2.4.131-1.fc44.src.rpm' |
| tool-version | csmock-3.8.7.20260803.142340.gb75b18e-1.el9 |