liblc3-1.1.1-2.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
liblc3-1.1.1-build/liblc3-1.1.1/src/attdet.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def2]
liblc3-1.1.1-build/liblc3-1.1.1/src/bits.c:281:17: warning[core.BitwiseShift]: Right shift by '32' overflows the capacity of 'unsigned int'
#  279|       /* --- Accumulate remaining bits -- */
#  280|   
#  281|->     accu->v = v >> n1;
#  282|       accu->n = n - n1;
#  283|   }

Error: CPPCHECK_WARNING: [#def3]
liblc3-1.1.1-build/liblc3-1.1.1/src/bwdet.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def4]
liblc3-1.1.1-build/liblc3-1.1.1/src/lc3.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def5]
liblc3-1.1.1-build/liblc3-1.1.1/src/ltpf.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-457): [#def6]
liblc3-1.1.1-build/liblc3-1.1.1/src/ltpf.c:498:31: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘r[0]’
liblc3-1.1.1-build/liblc3-1.1.1/src/ltpf.c: scope_hint: In function ‘detect_pitch’
#  496|       int arg;
#  497|   
#  498|->     float xw_max = (*x_max = x[arg = 0]);
#  499|       float w = 1 + w_incr;
#  500|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def7]
liblc3-1.1.1-build/liblc3-1.1.1/src/ltpf.c:502:23: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
liblc3-1.1.1-build/liblc3-1.1.1/src/ltpf.c: scope_hint: In function ‘detect_pitch’
#  500|   
#  501|       for (int i = 1; i < n; i++, w += w_incr)
#  502|->         if (xw_max < x[i] * w)
#  503|               xw_max = (*x_max = x[arg = i]) * w;
#  504|   

Error: CPPCHECK_WARNING: [#def8]
liblc3-1.1.1-build/liblc3-1.1.1/src/sns.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def9]
liblc3-1.1.1-build/liblc3-1.1.1/src/sns.c:305:11: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  303|       const float *ge = ge_table[sr];
#  304|   
#  305|->     float e0 = e[0], e1 = e[0], e2;
#  306|       float e_sum = 0;
#  307|   

Error: CLANG_WARNING: [#def10]
liblc3-1.1.1-build/liblc3-1.1.1/src/sns.c:309:46: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  307|   
#  308|       for (int i = 0; i < LC3_MAX_BANDS-1; ) {
#  309|->         e[i] = (e0 * 0.25f + e1 * 0.5f + (e2 = e[i+1]) * 0.25f) * ge[i];
#  310|           e_sum += e[i++];
#  311|   

Error: CLANG_WARNING: [#def11]
liblc3-1.1.1-build/liblc3-1.1.1/src/sns.c:312:46: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  310|           e_sum += e[i++];
#  311|   
#  312|->         e[i] = (e1 * 0.25f + e2 * 0.5f + (e0 = e[i+1]) * 0.25f) * ge[i];
#  313|           e_sum += e[i++];
#  314|   

Error: CLANG_WARNING: [#def12]
liblc3-1.1.1-build/liblc3-1.1.1/src/sns.c:315:46: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  313|           e_sum += e[i++];
#  314|   
#  315|->         e[i] = (e2 * 0.25f + e0 * 0.5f + (e1 = e[i+1]) * 0.25f) * ge[i];
#  316|           e_sum += e[i++];
#  317|       }

Error: CLANG_WARNING: [#def13]
liblc3-1.1.1-build/liblc3-1.1.1/src/sns.c:375:16: warning[deadcode.DeadStores]: Although the value stored to 'sn' is used in the enclosing expression, the value is never actually read from 'sn'
#  373|   
#  374|       scf[14] = (sn      ) * 1.f/4;
#  375|->     scf[15] = (sn -= s1) * 1.f/3;
#  376|       scf_sum += scf[14] + scf[15];
#  377|   

Error: CLANG_WARNING: [#def14]
liblc3-1.1.1-build/liblc3-1.1.1/src/sns.c:529:5: warning[deadcode.DeadStores]: Value stored to 'npulses' is never read
#  527|   
#  528|       add_pulse(xm, c[1], 10, npulses, 10, &corr, &energy);
#  529|->     npulses = 10;
#  530|   
#  531|       /* --- Shape 0 candidate ---

Error: GCC_ANALYZER_WARNING (CWE-835): [#def15]
liblc3-1.1.1-build/liblc3-1.1.1/src/sns.c: scope_hint: In function ‘deenum_mvpq’
liblc3-1.1.1-build/liblc3-1.1.1/src/sns.c:648:60: warning[-Wanalyzer-infinite-loop]: infinite loop
#  646|           int ci = 0;
#  647|   
#  648|->         for (ci = 0; idx < lc3_sns_mpvq_offsets[i][npulses - ci]; ci++);
#  649|           idx -= lc3_sns_mpvq_offsets[i][npulses - ci];
#  650|   

Error: CLANG_WARNING: [#def16]
liblc3-1.1.1-build/liblc3-1.1.1/src/spec.c:156:41: warning[core.UndefinedBinaryOperatorResult]: The left operand of '<' is a garbage value
#  154|           int v = 0;
#  155|   
#  156|->         for (j = j0; j >= 0 && e[j].q16 < gn; j--);
#  157|   
#  158|           for (j1 = j; j >= 0; j--) {

Error: CLANG_WARNING: [#def17]
liblc3-1.1.1-build/liblc3-1.1.1/src/spec.c:159:35: warning[core.UndefinedBinaryOperatorResult]: The left operand of '-' is a garbage value
#  157|   
#  158|           for (j1 = j; j >= 0; j--) {
#  159|->             int e_diff = e[j].q16 - gn;
#  160|   
#  161|               v += e_diff < 0 ? k_2u7 :

Error: CLANG_WARNING: [#def18]
liblc3-1.1.1-build/liblc3-1.1.1/src/spec.c:231:65: warning[core.DivideZero]: Division by zero
#  229|               (dt <= LC3_DT_2M5) * (1 + (nbits >= 520));
#  230|   
#  231|->         int g_incr = factor + (factor * (nbits - nbits_budget)) / delta;
#  232|           return LC3_MIN(g_idx + g_incr, 255) - g_idx;
#  233|       }

Error: CLANG_WARNING: [#def19]
liblc3-1.1.1-build/liblc3-1.1.1/src/spec.c:866:5: warning[deadcode.DeadStores]: Value stored to 'nbits' is never read
#  864|   
#  865|       side->g_idx = g_int + g_adj + g_off;
#  866|->     nbits = compute_nbits(dt, sr, nbytes,
#  867|           x, &side->nq, nbits_budget, &side->lsb_mode);
#  868|   }

Error: CPPCHECK_WARNING: [#def20]
liblc3-1.1.1-build/liblc3-1.1.1/tools/dlc3.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def21]
liblc3-1.1.1-build/liblc3-1.1.1/tools/elc3.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-457): [#def22]
liblc3-1.1.1-build/liblc3-1.1.1/tools/elc3.c:270: warning[uninitvar]: Uninitialized variable: out
#  268|           }
#  269|   
#  270|->         lc3bin_write_data(fp_out, out, block_bytes);
#  271|       }
#  272|   

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-151.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-nameliblc3-1.1.1-2.fc41
store-results-to/tmp/tmprsglf2tp/liblc3-1.1.1-2.fc41.tar.xz
time-created2024-07-03 14:51:48
time-finished2024-07-03 14:52:44
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmprsglf2tp/liblc3-1.1.1-2.fc41.tar.xz' '--gcc-analyze' '/tmp/tmprsglf2tp/liblc3-1.1.1-2.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9