Fixed findings

List of Findings

Error: SHELLCHECK_WARNING (CWE-457): [#def1]
/usr/lib/dracut/modules.d/50ostree/module-setup.sh:49:15: warning[SC2154]: initdir is referenced but not assigned.
#   47|       fi
#   48|       inst_simple "${systemdsystemunitdir}/ostree-prepare-root.service"
#   49|->     mkdir -p "${initdir}${systemdsystemconfdir}/initrd-root-fs.target.wants"
#   50|       ln_r "${systemdsystemunitdir}/ostree-prepare-root.service" \
#   51|           "${systemdsystemconfdir}/initrd-root-fs.target.wants/ostree-prepare-root.service"

Error: SHELLCHECK_WARNING (CWE-457): [#def2]
/usr/lib/dracut/modules.d/50ostree/module-setup.sh:49:25: warning[SC2154]: systemdsystemconfdir is referenced but not assigned.
#   47|       fi
#   48|       inst_simple "${systemdsystemunitdir}/ostree-prepare-root.service"
#   49|->     mkdir -p "${initdir}${systemdsystemconfdir}/initrd-root-fs.target.wants"
#   50|       ln_r "${systemdsystemunitdir}/ostree-prepare-root.service" \
#   51|           "${systemdsystemconfdir}/initrd-root-fs.target.wants/ostree-prepare-root.service"

Error: COMPILER_WARNING: [#def3]
libostree-2025.7/src/libostree/ostree-repo-static-delta-core.c: scope_hint: In function '_ostree_delta_get_endianness'
libostree-2025.7/src/libostree/ostree-repo-static-delta-core.c:820:11: warning[-Wunused-but-set-variable=]: variable 'total_usize' set but not used
#  820 |   guint64 total_usize = 0;
#      |           ^~~~~~~~~~~
#  818|   
#  819|     guint64 total_size = 0;
#  820|->   guint64 total_usize = 0;
#  821|     guint total_objects = 0;
#  822|     {

Error: COMPILER_WARNING (CWE-704): [#def4]
libostree-2025.7/src/ostree/ostree-trivial-httpd.c: scope_hint: In function ‘do_get’
libostree-2025.7/src/ostree/ostree-trivial-httpd.c:402:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  402 |       slash = strrchr (path, '/');
#      |             ^
#  400|     if (S_ISDIR (stbuf.st_mode))
#  401|       {
#  402|->       slash = strrchr (path, '/');
#  403|         if (!slash || slash[1])
#  404|           {

Error: COMPILER_WARNING (CWE-704): [#def5]
libostree-2025.7/src/ostree/ostree-trivial-httpd.c:402:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  400|     if (S_ISDIR (stbuf.st_mode))
#  401|       {
#  402|->       slash = strrchr (path, '/');
#  403|         if (!slash || slash[1])
#  404|           {

Scan Properties

analyzer-version-clippy1.97.1
analyzer-version-cppcheck2.21.1
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.97.1
diffbase-analyzer-version-cppcheck2.21.1
diffbase-analyzer-version-gcc16.1.1
diffbase-analyzer-version-gcc-analyzer16.1.1
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-214.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-nameostree-2026.2-3.fc45
diffbase-store-results-to/tmp/tmphn4ns2oi/ostree-2026.2-3.fc45.tar.xz
diffbase-time-created2026-08-03 18:58:19
diffbase-time-finished2026-08-03 19:02:07
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmphn4ns2oi/ostree-2026.2-3.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmphn4ns2oi/ostree-2026.2-3.fc45.src.rpm'
diffbase-tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-214.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameostree-2025.7-2.fc44
store-results-to/tmp/tmp8jza7a5d/ostree-2025.7-2.fc44.tar.xz
time-created2026-08-03 18:53:30
time-finished2026-08-03 18:57:56
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmp8jza7a5d/ostree-2025.7-2.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp8jza7a5d/ostree-2025.7-2.fc44.src.rpm'
tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9