Fixed findings

List of Findings

Error: COMPILER_WARNING (CWE-704): [#def1]
mpg123-1.32.10/src/httpget.c: scope_hint: In function ‘debunk_mime’
mpg123-1.32.10/src/httpget.c:123:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  123 |         aux = strchr(mime, ';');
#      |             ^
#  121|   	char *aux;
#  122|   	/* Watch out for such: "audio/x-mpegurl; charset=utf-8" */
#  123|-> 	aux = strchr(mime, ';');
#  124|   	if(aux != NULL)
#  125|   	{

Error: COMPILER_WARNING (CWE-704): [#def2]
mpg123-1.32.10/src/httpget.c:123:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  121|   	char *aux;
#  122|   	/* Watch out for such: "audio/x-mpegurl; charset=utf-8" */
#  123|-> 	aux = strchr(mime, ';');
#  124|   	if(aux != NULL)
#  125|   	{

Error: COMPILER_WARNING: [#def3]
mpg123-1.32.10/src/libmpg123/layer2.c: scope_hint: In function 'INT123_init_layer12_table_mmx'
mpg123-1.32.10/src/libmpg123/layer2.c:54:15: warning[-Wunused-but-set-variable=]: variable 'j' set but not used
#   54 |         int i,j;
#      |               ^
#   52|   real* INT123_init_layer12_table_mmx(mpg123_handle *fr, real *table, int m)
#   53|   {
#   54|-> 	int i,j;
#   55|   	if(!fr->p.down_sample) 
#   56|   	{

Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
mpg123-1.32.10/src/streamdump.c:75:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#   73|   	if(nh)
#   74|   		return;
#   75|-> 	int *fdp = nh->parts;
#   76|   #ifdef WANT_WIN32_SOCKETS
#   77|   	if(*fdp != SOCKET_ERROR)

Error: COMPILER_WARNING (CWE-704): [#def5]
mpg123-1.32.10/src/sysutil.c: scope_hint: In function ‘dir_length’
mpg123-1.32.10/src/sysutil.c:36:27: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#   36 |         char * slashpos = strrchr(path, '/');
#      |                           ^~~~~~~
#   34|   size_t dir_length(const char *path)
#   35|   {
#   36|-> 	char * slashpos = strrchr(path, '/');
#   37|   	return (slashpos ? slashpos-path : 0);
#   38|   }

Error: COMPILER_WARNING (CWE-704): [#def6]
mpg123-1.32.10/src/sysutil.c:36:27: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#   34|   size_t dir_length(const char *path)
#   35|   {
#   36|-> 	char * slashpos = strrchr(path, '/');
#   37|   	return (slashpos ? slashpos-path : 0);
#   38|   }

Error: COMPILER_WARNING (CWE-704): [#def7]
mpg123-1.32.10/src/sysutil.c: scope_hint: In function ‘split_dir_file’
mpg123-1.32.10/src/sysutil.c:56:23: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#   56 |         if ((slashpos = strrchr(path, '/'))) {
#      |                       ^
#   54|   	char *slashpos;
#   55|   
#   56|-> 	if ((slashpos = strrchr(path, '/'))) {
#   57|   		*fname = slashpos + 1;
#   58|   		*dname = INT123_compat_strdup(path); /* , 1 + slashpos - path); */

Error: COMPILER_WARNING (CWE-704): [#def8]
mpg123-1.32.10/src/sysutil.c:56:23: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#   54|   	char *slashpos;
#   55|   
#   56|-> 	if ((slashpos = strrchr(path, '/'))) {
#   57|   		*fname = slashpos + 1;
#   58|   		*dname = INT123_compat_strdup(path); /* , 1 + slashpos - path); */

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-121.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-namempg123-1.33.6-3.fc45
diffbase-store-results-to/tmp/tmppfd7srss/mpg123-1.33.6-3.fc45.tar.xz
diffbase-time-created2026-08-03 18:52:59
diffbase-time-finished2026-08-03 18:54:44
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmppfd7srss/mpg123-1.33.6-3.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmppfd7srss/mpg123-1.33.6-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-121.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-namempg123-1.32.10-3.fc44
store-results-to/tmp/tmps4ziocwv/mpg123-1.32.10-3.fc44.tar.xz
time-created2026-08-03 18:50:14
time-finished2026-08-03 18:52:49
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmps4ziocwv/mpg123-1.32.10-3.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmps4ziocwv/mpg123-1.32.10-3.fc44.src.rpm'
tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9