soxr-0.1.3-17.fc42

List of Findings

Error: GCC_ANALYZER_WARNING: [#def1]
soxr-0.1.3-build/soxr-0.1.3-Source/examples/3-options-input-fn.c: scope_hint: In function ‘main’
soxr-0.1.3-build/soxr-0.1.3-Source/examples/3-options-input-fn.c:71:23: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results
soxr-0.1.3-build/soxr-0.1.3-Source/examples/3-options-input-fn.c:71:23: note: only use operands of an integer type inside the size argument
#   69|     size_t const olen = min(max(olen0, 1), buf_total_len - 1);
#   70|     size_t const ilen = buf_total_len - olen;
#   71|->   void * const obuf = malloc(osize * olen);
#   72|     void * const ibuf = malloc(isize * ilen);
#   73|   

Error: GCC_ANALYZER_WARNING: [#def2]
soxr-0.1.3-build/soxr-0.1.3-Source/examples/3-options-input-fn.c:72:23: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results
soxr-0.1.3-build/soxr-0.1.3-Source/examples/3-options-input-fn.c:72:23: note: only use operands of an integer type inside the size argument
#   70|     size_t const ilen = buf_total_len - olen;
#   71|     void * const obuf = malloc(osize * olen);
#   72|->   void * const ibuf = malloc(isize * ilen);
#   73|   
#   74|     input_context_t icontext;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def3]
soxr-0.1.3-build/soxr-0.1.3-Source/src/cr.c: scope_hint: In function ‘stage_process’
soxr-0.1.3-build/soxr-0.1.3-Source/src/cr.c:506:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h:62:15: note: in expansion of macro ‘FIFO_REALLOC’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h:62:15: note: in expansion of macro ‘FIFO_REALLOC’
<built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null
#  504|       if (stage->is_input) {
#  505|         if (flushing)
#  506|->         memset(fifo_reserve(fifo, want), 0, fifo->item_size * (size_t)want);
#  507|         else done = true;
#  508|       }

Error: CPPCHECK_WARNING (CWE-401): [#def4]
soxr-0.1.3-build/soxr-0.1.3-Source/src/fft4g_cache.h:43: error[memleakOnRealloc]: Common realloc mistake: 'lsx_fft_br' nulled but not freed upon failure
#   41|         int old_n = FFT_LEN;
#   42|         FFT_LEN = len;
#   43|->       LSX_FFT_BR = realloc(LSX_FFT_BR, dft_br_len(FFT_LEN) * sizeof(*LSX_FFT_BR));
#   44|         LSX_FFT_SC = realloc(LSX_FFT_SC, dft_sc_len(FFT_LEN) * sizeof(*LSX_FFT_SC));
#   45|         if (!old_n) {

Error: CPPCHECK_WARNING (CWE-401): [#def5]
soxr-0.1.3-build/soxr-0.1.3-Source/src/fft4g_cache.h:43: error[memleakOnRealloc]: Common realloc mistake: 'lsx_fft_br_f' nulled but not freed upon failure
#   41|         int old_n = FFT_LEN;
#   42|         FFT_LEN = len;
#   43|->       LSX_FFT_BR = realloc(LSX_FFT_BR, dft_br_len(FFT_LEN) * sizeof(*LSX_FFT_BR));
#   44|         LSX_FFT_SC = realloc(LSX_FFT_SC, dft_sc_len(FFT_LEN) * sizeof(*LSX_FFT_SC));
#   45|         if (!old_n) {

Error: GCC_ANALYZER_WARNING: [#def6]
soxr-0.1.3-build/soxr-0.1.3-Source/src/filter.c:28: included_from: Included from here.
soxr-0.1.3-build/soxr-0.1.3-Source/src/fft4g_cache.h: scope_hint: In function ‘update_fft_cache’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fft4g_cache.h:43:20: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results
soxr-0.1.3-build/soxr-0.1.3-Source/src/filter.c:12: included_from: Included from here.
soxr-0.1.3-build/soxr-0.1.3-Source/src/fft4g_cache.h:38:5: note: in expansion of macro ‘ccrw2_cease_reading’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fft4g_cache.h:43:20: note: only use operands of an integer type inside the size argument
#   41|         int old_n = FFT_LEN;
#   42|         FFT_LEN = len;
#   43|->       LSX_FFT_BR = realloc(LSX_FFT_BR, dft_br_len(FFT_LEN) * sizeof(*LSX_FFT_BR));
#   44|         LSX_FFT_SC = realloc(LSX_FFT_SC, dft_sc_len(FFT_LEN) * sizeof(*LSX_FFT_SC));
#   45|         if (!old_n) {

Error: CPPCHECK_WARNING (CWE-401): [#def7]
soxr-0.1.3-build/soxr-0.1.3-Source/src/fft4g_cache.h:44: error[memleakOnRealloc]: Common realloc mistake: 'lsx_fft_sc' nulled but not freed upon failure
#   42|         FFT_LEN = len;
#   43|         LSX_FFT_BR = realloc(LSX_FFT_BR, dft_br_len(FFT_LEN) * sizeof(*LSX_FFT_BR));
#   44|->       LSX_FFT_SC = realloc(LSX_FFT_SC, dft_sc_len(FFT_LEN) * sizeof(*LSX_FFT_SC));
#   45|         if (!old_n) {
#   46|           LSX_FFT_BR[0] = 0;

Error: CPPCHECK_WARNING (CWE-401): [#def8]
soxr-0.1.3-build/soxr-0.1.3-Source/src/fft4g_cache.h:44: error[memleakOnRealloc]: Common realloc mistake: 'lsx_fft_sc_f' nulled but not freed upon failure
#   42|         FFT_LEN = len;
#   43|         LSX_FFT_BR = realloc(LSX_FFT_BR, dft_br_len(FFT_LEN) * sizeof(*LSX_FFT_BR));
#   44|->       LSX_FFT_SC = realloc(LSX_FFT_SC, dft_sc_len(FFT_LEN) * sizeof(*LSX_FFT_SC));
#   45|         if (!old_n) {
#   46|           LSX_FFT_BR[0] = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def9]
soxr-0.1.3-build/soxr-0.1.3-Source/src/fft4g_cache.h:46:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fft4g_cache.h:38:5: note: in expansion of macro ‘ccrw2_cease_reading’
#   44|         LSX_FFT_SC = realloc(LSX_FFT_SC, dft_sc_len(FFT_LEN) * sizeof(*LSX_FFT_SC));
#   45|         if (!old_n) {
#   46|->         LSX_FFT_BR[0] = 0;
#   47|   #if SOXR_LIB
#   48|           atexit(LSX_CLEAR_FFT_CACHE);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def10]
soxr-0.1.3-build/soxr-0.1.3-Source/src/cr.h:8: included_from: Included from here.
soxr-0.1.3-build/soxr-0.1.3-Source/src/cr.c:18: included_from: Included from here.
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h: scope_hint: In function ‘fifo_write’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h:74:5: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h:62:15: note: in expansion of macro ‘FIFO_REALLOC’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h:62:15: note: in expansion of macro ‘FIFO_REALLOC’
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
#   72|     void * s = fifo_reserve(f, n0);
#   73|     if (data)
#   74|->     memcpy(s, data, n * f->item_size);
#   75|     return s;
#   76|   }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def11]
soxr-0.1.3-build/soxr-0.1.3-Source/src/filter.c: scope_hint: In function ‘_soxr_fir_to_phase’
soxr-0.1.3-build/soxr-0.1.3-Source/src/filter.c:166:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘work’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
#  164|     pi_wraps = malloc((((size_t)work_len + 2) / 2) * sizeof(*pi_wraps));
#  165|   
#  166|->   memcpy(work, *h, (size_t)*len * sizeof(*work));
#  167|     lsx_safe_rdft(work_len, 1, work); /* Cepstral: */
#  168|     LSX_UNPACK(work, work_len);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def12]
soxr-0.1.3-build/soxr-0.1.3-Source/src/filter.c:183:22: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘pi_wraps’
#  181|       prev_angle1 = angle;
#  182|       cum_1pi += fabs(adjust); /* fabs for when 2pi and 1pi have combined */
#  183|->     pi_wraps[i >> 1] = cum_1pi;
#  184|   
#  185|       work[i] = safe_log(sqrt(sqr(work[i]) + sqr(work[i + 1])));

Error: COMPILER_WARNING: [#def13]
soxr-0.1.3-build/soxr-0.1.3-Source/src/pffft.c:154: included_from: Included from here.
soxr-0.1.3-build/soxr-0.1.3-Source/src/pffft-wrap.c:27: included_from: Included from here.
soxr-0.1.3-build/soxr-0.1.3-Source/src/pffft64s.c:5: included_from: Included from here.
soxr-0.1.3-build/soxr-0.1.3-Source/src/pffft.c: scope_hint: In function ‘pffft_zreorder’
soxr-0.1.3-build/soxr-0.1.3-Source/src/pffft-avx.h:19:3: warning[-Wpsabi]: AVX vector return without AVX enabled changes the ABI
soxr-0.1.3-build/soxr-0.1.3-Source/src/pffft.c:1355:9: note: in expansion of macro ‘INTERLEAVE2’
#   17|   #define LD_PS1(p) _mm256_set1_pd(p)
#   18|   #define INTERLEAVE2(in1, in2, out1, out2) {v4sf \
#   19|->   t1 = _mm256_unpacklo_pd(in1, in2), \
#   20|     t2 = _mm256_unpackhi_pd(in1, in2); \
#   21|     out1 = _mm256_permute2f128_pd(t1,t2,0x20); \

Error: COMPILER_WARNING: [#def14]
soxr-0.1.3-build/soxr-0.1.3-Source/src/pffft.c:154: included_from: Included from here.
soxr-0.1.3-build/soxr-0.1.3-Source/src/util-simd.c:43: included_from: Included from here.
soxr-0.1.3-build/soxr-0.1.3-Source/src/util64s.c:8: included_from: Included from here.
soxr-0.1.3-build/soxr-0.1.3-Source/src/util-simd.c: scope_hint: In function ‘_soxr_ordered_convolve_simd64’
soxr-0.1.3-build/soxr-0.1.3-Source/src/pffft-avx.h:24:3: warning[-Wpsabi]: AVX vector return without AVX enabled changes the ABI
soxr-0.1.3-build/soxr-0.1.3-Source/src/util-simd.c:58:5: note: in expansion of macro ‘UNINTERLEAVE2’
#   22|     out2 = _mm256_permute2f128_pd(t1,t2,0x31); }
#   23|   #define UNINTERLEAVE2(in1, in2, out1, out2) {v4sf \
#   24|->   t1 = _mm256_permute2f128_pd(in1,in2,0x20), \
#   25|     t2 = _mm256_permute2f128_pd(in1,in2,0x31); \
#   26|     out1 = _mm256_unpacklo_pd(t1, t2); \

Error: GCC_ANALYZER_WARNING (CWE-476): [#def15]
soxr-0.1.3-build/soxr-0.1.3-Source/src/cr-core.c:200: included_from: Included from here.
soxr-0.1.3-build/soxr-0.1.3-Source/src/cr32.c:8: included_from: Included from here.
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h: scope_hint: In function ‘vpoly3’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:49:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:81:29: note: in expansion of macro ‘END’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:114:45: note: in expansion of macro ‘highPrecCore’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:50:19: note: in expansion of macro ‘core’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:128:3: note: in expansion of macro ‘CORE’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:121:13: note: in expansion of macro ‘FUNCTION’
soxr-0.1.3-build/soxr-0.1.3-Source/src/cr.h:8: included_from: Included from here.
soxr-0.1.3-build/soxr-0.1.3-Source/src/cr-core.c:15: included_from: Included from here.
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h:62:15: note: in expansion of macro ‘FIFO_REALLOC’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h:62:15: note: in expansion of macro ‘FIFO_REALLOC’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:50:19: note: in expansion of macro ‘core’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:128:3: note: in expansion of macro ‘CORE’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:75:55: note: in expansion of macro ‘integer’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:114:45: note: in expansion of macro ‘highPrecCore’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:50:19: note: in expansion of macro ‘core’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:128:3: note: in expansion of macro ‘CORE’
soxr-0.1.3-build/soxr-0.1.3-Source/src/cr-core.c:199:21: note: in expansion of macro ‘VAR_CONVOLVE’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:81:16: note: in expansion of macro ‘CONVOLVE’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:114:45: note: in expansion of macro ‘highPrecCore’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:50:19: note: in expansion of macro ‘core’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:128:3: note: in expansion of macro ‘CORE’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:81:29: note: in expansion of macro ‘END’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:114:45: note: in expansion of macro ‘highPrecCore’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:50:19: note: in expansion of macro ‘core’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:128:3: note: in expansion of macro ‘CORE’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:81:29: note: in expansion of macro ‘END’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:114:45: note: in expansion of macro ‘highPrecCore’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:50:19: note: in expansion of macro ‘core’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:128:3: note: in expansion of macro ‘CORE’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:81:29: note: in expansion of macro ‘END’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:114:45: note: in expansion of macro ‘highPrecCore’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:50:19: note: in expansion of macro ‘core’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir.h:128:3: note: in expansion of macro ‘CORE’
#   47|   
#   48|     #define BEGINNING sample_t sum = 0
#   49|->   #define END output[i] = sum
#   50|     #define CORE(n) core(n)
#   51|   #endif

Error: GCC_ANALYZER_WARNING (CWE-476): [#def16]
soxr-0.1.3-build/soxr-0.1.3-Source/src/cr-core.c:210: included_from: Included from here.
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir0.h: scope_hint: In function ‘U100_0’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir0.h:20:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir0.h:28:40: note: in expansion of macro ‘END’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir0.h:21:19: note: in expansion of macro ‘core’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir0.h:39:5: note: in expansion of macro ‘CORE’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir0.h:30:13: note: in expansion of macro ‘FUNCTION’
soxr-0.1.3-build/soxr-0.1.3-Source/src/cr.h:123:38: note: in expansion of macro ‘fifo_read_ptr’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir0.h:34:30: note: in expansion of macro ‘stage_read_p’
soxr-0.1.3-build/soxr-0.1.3-Source/src/cr.h:123:38: note: in expansion of macro ‘fifo_read_ptr’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir0.h:34:30: note: in expansion of macro ‘stage_read_p’
soxr-0.1.3-build/soxr-0.1.3-Source/src/cr.h:123:38: note: in expansion of macro ‘fifo_read_ptr’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir0.h:34:30: note: in expansion of macro ‘stage_read_p’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h:62:15: note: in expansion of macro ‘FIFO_REALLOC’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h:62:15: note: in expansion of macro ‘FIFO_REALLOC’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir0.h:21:19: note: in expansion of macro ‘core’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir0.h:39:5: note: in expansion of macro ‘CORE’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir0.h:21:19: note: in expansion of macro ‘core’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir0.h:39:5: note: in expansion of macro ‘CORE’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir0.h:28:40: note: in expansion of macro ‘END’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir0.h:21:19: note: in expansion of macro ‘core’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir0.h:39:5: note: in expansion of macro ‘CORE’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir0.h:28:40: note: in expansion of macro ‘END’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir0.h:21:19: note: in expansion of macro ‘core’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir0.h:39:5: note: in expansion of macro ‘CORE’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir0.h:28:40: note: in expansion of macro ‘END’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir0.h:21:19: note: in expansion of macro ‘core’
soxr-0.1.3-build/soxr-0.1.3-Source/src/poly-fir0.h:39:5: note: in expansion of macro ‘CORE’
#   18|         sample_t const * const __restrict coefs = (sample_t *)COEFS + N * rem;
#   19|     #define _ sum += coefs[j]*at[j], ++j;
#   20|->   #define END output[i] = sum
#   21|     #define CORE(n) core(n)
#   22|   #endif

Error: COMPILER_WARNING (CWE-843): [#def17]
soxr-0.1.3-build/soxr-0.1.3-Source/src/soxr-lsr.c: scope_hint: In function ‘src_callback_new’
soxr-0.1.3-build/soxr-0.1.3-Source/src/soxr-lsr.c:82:37: warning[-Wcast-function-type]: cast between incompatible function types from ‘src_callback_t’ {aka ‘long int (*)(void *, float **)’} to ‘size_t (*)(void *, const void **, size_t)’ {aka ‘long unsigned int (*)(void *, const void **, long unsigned int)’}
#   82 |     error = soxr_set_input_fn(soxr, (soxr_input_fn_t)fn, p, 0);
#      |                                     ^
#   80|   
#   81|     if (soxr)
#   82|->     error = soxr_set_input_fn(soxr, (soxr_input_fn_t)fn, p, 0);
#   83|   
#   84|     if (error0)

Error: COMPILER_WARNING: [#def18]
soxr-0.1.3-build/soxr-0.1.3-Source/src/soxr.c: scope_hint: In function ‘soxr_create’
soxr-0.1.3-build/soxr-0.1.3-Source/src/soxr.c:396:36: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  396 |   if (!error && !(p = calloc(sizeof(*p), 1))) error = "malloc failed";
#      |                                    ^
soxr-0.1.3-build/soxr-0.1.3-Source/src/soxr.c:396:36: note: earlier argument should specify number of elements, later size of each element
#  394|       error = "invalid io datatype(s)";
#  395|   
#  396|->   if (!error && !(p = calloc(sizeof(*p), 1))) error = "malloc failed";
#  397|   
#  398|     if (p) {

Error: COMPILER_WARNING: [#def19]
soxr-0.1.3-build/soxr-0.1.3-Source/src/soxr.c: scope_hint: In function ‘initialise’
soxr-0.1.3-build/soxr-0.1.3-Source/src/soxr.c:533:34: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  533 |   p->channel_ptrs = calloc(sizeof(*p->channel_ptrs), p->num_channels);
#      |                                  ^
soxr-0.1.3-build/soxr-0.1.3-Source/src/soxr.c:533:34: note: earlier argument should specify number of elements, later size of each element
#  531|   
#  532|     resampler_sizes(&shared_size, &channel_size);
#  533|->   p->channel_ptrs = calloc(sizeof(*p->channel_ptrs), p->num_channels);
#  534|     p->shared = calloc(shared_size, 1);
#  535|     p->resamplers = calloc(sizeof(*p->resamplers), p->num_channels);

Error: COMPILER_WARNING: [#def20]
soxr-0.1.3-build/soxr-0.1.3-Source/src/soxr.c:535:32: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
#  535 |   p->resamplers = calloc(sizeof(*p->resamplers), p->num_channels);
#      |                                ^
soxr-0.1.3-build/soxr-0.1.3-Source/src/soxr.c:535:32: note: earlier argument should specify number of elements, later size of each element
#  533|     p->channel_ptrs = calloc(sizeof(*p->channel_ptrs), p->num_channels);
#  534|     p->shared = calloc(shared_size, 1);
#  535|->   p->resamplers = calloc(sizeof(*p->resamplers), p->num_channels);
#  536|     if (!p->shared || !p->channel_ptrs || !p->resamplers)
#  537|       return fatal_error(p, "malloc failed");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
soxr-0.1.3-build/soxr-0.1.3-Source/src/soxr.c: scope_hint: In function ‘initialise’
soxr-0.1.3-build/soxr-0.1.3-Source/src/soxr.c:541:8: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(channel_size, 1)’
soxr-0.1.3-build/soxr-0.1.3-Source/src/soxr.c:11: included_from: Included from here.
soxr-0.1.3-build/soxr-0.1.3-Source/src/soxr.c:388:5: note: in expansion of macro ‘lsx_debug’
soxr-0.1.3-build/soxr-0.1.3-Source/src/soxr.c:543:13: note: in expansion of macro ‘resampler_create’
#  539|     for (i = 0; i < p->num_channels; ++i) {
#  540|       soxr_error_t error;
#  541|->     if (!(p->resamplers[i] = calloc(channel_size, 1)))
#  542|         return fatal_error(p, "malloc failed");
#  543|       error = resampler_create(

Error: GCC_ANALYZER_WARNING (CWE-476): [#def22]
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c: scope_hint: In function ‘prepare_coefs’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:137:12: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘p’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:268:58: note: in definition of macro ‘shiftr’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:305:33: note: in expansion of macro ‘shiftl’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:307:5: note: in expansion of macro ‘stage_preload’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h: scope_hint: In function ‘prepare_coefs’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:307:5: note: in expansion of macro ‘stage_preload’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:10: included_from: Included from here.
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:309:5: note: in expansion of macro ‘lsx_debug’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:309:5: note: in expansion of macro ‘lsx_debug’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:130:34: note: in expansion of macro ‘COEF’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:130:34: note: in expansion of macro ‘COEF’
#  135|       for (; pos / phases == i; pos += phases0) {
#  136|         double x = (double)(pos % phases) / phases;
#  137|->       *p++ = (float)(k[K0] + ((((a*x + b)*x + c)*x + d)*x + e)*x);
#  138|       }
#  139|       for (j = 0; j < iAL(k) - 1; k[j] = k[j + 1], ++j);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def23]
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:272:26: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:307:5: note: in expansion of macro ‘stage_preload’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:268:58: note: in definition of macro ‘shiftr’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:305:33: note: in expansion of macro ‘shiftl’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:307:5: note: in expansion of macro ‘stage_preload’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h: scope_hint: In function ‘vr_init’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:307:5: note: in expansion of macro ‘stage_preload’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:309:5: note: in expansion of macro ‘lsx_debug’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:309:5: note: in expansion of macro ‘lsx_debug’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:268:58: note: in definition of macro ‘shiftr’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:305:33: note: in expansion of macro ‘shiftl’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:307:5: note: in expansion of macro ‘stage_preload’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h: scope_hint: In function ‘vr_init’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:307:5: note: in expansion of macro ‘stage_preload’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:309:5: note: in expansion of macro ‘lsx_debug’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:307:5: note: in expansion of macro ‘stage_preload’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h:62:15: note: in expansion of macro ‘FIFO_REALLOC’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:307:5: note: in expansion of macro ‘stage_preload’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:307:5: note: in expansion of macro ‘stage_preload’
<built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null
#  270|   #define stage_occupancy(s) (fifo_occupancy(&(s)->fifo) - 4*HALF_FIR_LEN_2)
#  271|   #define stage_read_p(s) ((float *)fifo_read_ptr(&(s)->fifo) + 2*HALF_FIR_LEN_2)
#  272|-> #define stage_preload(s) memset(fifo_reserve(&(s)->fifo, (s)->preload), \
#  273|       0, sizeof(float) * (size_t)(s)->preload);
#  274|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def24]
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:272:26: warning[-Wanalyzer-null-argument]: use of NULL ‘**p.stages.fifo.data’ where non-null expected
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:594:5: note: in expansion of macro ‘stage_preload’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:594:5: note: in expansion of macro ‘stage_preload’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h:62:15: note: in expansion of macro ‘FIFO_REALLOC’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h:62:15: note: in expansion of macro ‘FIFO_REALLOC’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:594:5: note: in expansion of macro ‘stage_preload’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:594:5: note: in expansion of macro ‘stage_preload’
<built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null
#  270|   #define stage_occupancy(s) (fifo_occupancy(&(s)->fifo) - 4*HALF_FIR_LEN_2)
#  271|   #define stage_read_p(s) ((float *)fifo_read_ptr(&(s)->fifo) + 2*HALF_FIR_LEN_2)
#  272|-> #define stage_preload(s) memset(fifo_reserve(&(s)->fifo, (s)->preload), \
#  273|       0, sizeof(float) * (size_t)(s)->preload);
#  274|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def25]
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:272:26: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*s.fifo.data’ where non-null expected
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:307:5: note: in expansion of macro ‘stage_preload’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:268:58: note: in definition of macro ‘shiftr’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:305:33: note: in expansion of macro ‘shiftl’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:307:5: note: in expansion of macro ‘stage_preload’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h: scope_hint: In function ‘vr_init’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:307:5: note: in expansion of macro ‘stage_preload’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:309:5: note: in expansion of macro ‘lsx_debug’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:309:5: note: in expansion of macro ‘lsx_debug’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h:122:22: note: in expansion of macro ‘FIFO_MALLOC’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:268:58: note: in definition of macro ‘shiftr’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:305:33: note: in expansion of macro ‘shiftl’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:307:5: note: in expansion of macro ‘stage_preload’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h: scope_hint: In function ‘vr_init’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:307:5: note: in expansion of macro ‘stage_preload’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:307:5: note: in expansion of macro ‘stage_preload’
<built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null
#  270|   #define stage_occupancy(s) (fifo_occupancy(&(s)->fifo) - 4*HALF_FIR_LEN_2)
#  271|   #define stage_read_p(s) ((float *)fifo_read_ptr(&(s)->fifo) + 2*HALF_FIR_LEN_2)
#  272|-> #define stage_preload(s) memset(fifo_reserve(&(s)->fifo, (s)->preload), \
#  273|       0, sizeof(float) * (size_t)(s)->preload);
#  274|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def26]
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:272:26: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fifo_reserve(&*s.fifo,  <unknown>)’ where non-null expected
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:307:5: note: in expansion of macro ‘stage_preload’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h:122:22: note: in expansion of macro ‘FIFO_MALLOC’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:268:58: note: in definition of macro ‘shiftr’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:305:33: note: in expansion of macro ‘shiftl’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:307:5: note: in expansion of macro ‘stage_preload’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h: scope_hint: In function ‘vr_init’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:307:5: note: in expansion of macro ‘stage_preload’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:307:5: note: in expansion of macro ‘stage_preload’
<built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null
#  270|   #define stage_occupancy(s) (fifo_occupancy(&(s)->fifo) - 4*HALF_FIR_LEN_2)
#  271|   #define stage_read_p(s) ((float *)fifo_read_ptr(&(s)->fifo) + 2*HALF_FIR_LEN_2)
#  272|-> #define stage_preload(s) memset(fifo_reserve(&(s)->fifo, (s)->preload), \
#  273|       0, sizeof(float) * (size_t)(s)->preload);
#  274|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def27]
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c: scope_hint: In function ‘vr_init’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:305:18: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘s’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:268:58: note: in definition of macro ‘shiftr’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:305:33: note: in expansion of macro ‘shiftl’
#  303|       stage_t * s = &p->stages[i];
#  304|       fifo_create(&s->fifo, sizeof(float));
#  305|->     s->step_mult = 2 * MULT32 / shiftl(2, i);
#  306|       s->preload = i < 0? 0 : i == 0? 2 * HALF_FIR_LEN_2 : 3 * HALF_FIR_LEN_2 / 2;
#  307|       stage_preload(s);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:308:16: warning[-Wanalyzer-malloc-leak]: leak of ‘*s.fifo.data’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:268:58: note: in definition of macro ‘shiftr’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:305:33: note: in expansion of macro ‘shiftl’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:307:5: note: in expansion of macro ‘stage_preload’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h: scope_hint: In function ‘vr_init’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:307:5: note: in expansion of macro ‘stage_preload’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:309:5: note: in expansion of macro ‘lsx_debug’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:309:5: note: in expansion of macro ‘lsx_debug’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h:122:22: note: in expansion of macro ‘FIFO_MALLOC’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:268:58: note: in definition of macro ‘shiftr’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:305:33: note: in expansion of macro ‘shiftl’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:307:5: note: in expansion of macro ‘stage_preload’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h: scope_hint: In function ‘vr_init’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:307:5: note: in expansion of macro ‘stage_preload’
#  306|       s->preload = i < 0? 0 : i == 0? 2 * HALF_FIR_LEN_2 : 3 * HALF_FIR_LEN_2 / 2;
#  307|       stage_preload(s);
#  308|->     s->is_fast = true;
#  309|       lsx_debug("%-3i preload=%i", i, s->preload);
#  310|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:314:38: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
#  312|     p->default_io_ratio = default_io_ratio;
#  313|     if (fade_coefs[0]==0) {
#  314|->     for (i = 0; i < iAL(fade_coefs); ++i)
#  315|         fade_coefs[i] = (float)(.5 * (1 + cos(M_PI * i / (AL(fade_coefs) - 1))));
#  316|       prepare_coefs(poly_fir_coefs_u, POLY_FIR_LEN_U, PHASES0_U, PHASES_U, coefs0_u, mult);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def30]
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c: scope_hint: In function ‘do_input_stage’
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:392:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h:62:15: note: in expansion of macro ‘FIFO_REALLOC’
#  390|     dest = fifo_reserve(&s->fifo, len);
#  391|     if (stage_num < 0) for (; i < len; ++src)
#  392|->     dest[i++] = double_fir0(src), dest[i++] = double_fir1(src);
#  393|     else {
#  394|       bool should_be_fast = p->stage_inc;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def31]
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:409:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h:62:15: note: in expansion of macro ‘FIFO_REALLOC’
#  407|         if (should_be_fast)
#  408|           for (; i < n; vol2 += 2, vol1 -= 2, src += 2)
#  409|->           dest[i++] = *vol1 * fast_half_fir(src) + *vol2 * half_fir(src);
#  410|         else for (; i < n; vol2 += 2, vol1 -= 2, src += 2)
#  411|           dest[i++] = *vol2 * fast_half_fir(src) + *vol1 * half_fir(src);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def32]
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:411:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h:62:15: note: in expansion of macro ‘FIFO_REALLOC’
#  409|             dest[i++] = *vol1 * fast_half_fir(src) + *vol2 * half_fir(src);
#  410|         else for (; i < n; vol2 += 2, vol1 -= 2, src += 2)
#  411|->         dest[i++] = *vol2 * fast_half_fir(src) + *vol1 * half_fir(src);
#  412|         s->x_fade_len -= n;
#  413|         p->xfade -= !s->x_fade_len;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def33]
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:416:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h:62:15: note: in expansion of macro ‘FIFO_REALLOC’
#  414|       }
#  415|       if (stage_num < min_stage_num)
#  416|->       for (; i < len; dest[i++] = fast_half_fir(src), src += 2);
#  417|       else for (; i < len; dest[i++] = half_fir(src), src += 2);
#  418|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def34]
soxr-0.1.3-build/soxr-0.1.3-Source/src/vr32.c:417:36: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
soxr-0.1.3-build/soxr-0.1.3-Source/src/fifo.h:62:15: note: in expansion of macro ‘FIFO_REALLOC’
#  415|       if (stage_num < min_stage_num)
#  416|         for (; i < len; dest[i++] = fast_half_fir(src), src += 2);
#  417|->     else for (; i < len; dest[i++] = half_fir(src), src += 2);
#  418|     }
#  419|     if (p->flushing > 0)

Error: GCC_ANALYZER_WARNING: [#def35]
soxr-0.1.3-build/soxr-0.1.3-Source/tests/throughput.c: scope_hint: In function ‘main’
soxr-0.1.3-build/soxr-0.1.3-Source/tests/throughput.c:82:23: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results
soxr-0.1.3-build/soxr-0.1.3-Source/tests/throughput.c:82:23: note: only use operands of an integer type inside the size argument
#   80|     size_t const olen = min(max(olen0, 1), buf_total_len - 1);
#   81|     size_t const ilen = buf_total_len - olen;
#   82|->   void * const obuf = malloc(osize * olen);
#   83|     void * const ibuf = malloc(isize * ilen);
#   84|   

Error: GCC_ANALYZER_WARNING: [#def36]
soxr-0.1.3-build/soxr-0.1.3-Source/tests/throughput.c:83:23: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results
soxr-0.1.3-build/soxr-0.1.3-Source/tests/throughput.c:83:23: note: only use operands of an integer type inside the size argument
#   81|     size_t const ilen = buf_total_len - olen;
#   82|     void * const obuf = malloc(osize * olen);
#   83|->   void * const ibuf = malloc(isize * ilen);
#   84|   
#   85|     size_t odone = 0, clips = 0, omax = 0, i;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def37]
soxr-0.1.3-build/soxr-0.1.3-Source/tests/throughput.c:113:58: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ibuf’
soxr-0.1.3-build/soxr-0.1.3-Source/tests/throughput.c:105:21: note: in expansion of macro ‘ranqd1’
soxr-0.1.3-build/soxr-0.1.3-Source/tests/throughput.c:106:15: note: in expansion of macro ‘dranqd1’
soxr-0.1.3-build/soxr-0.1.3-Source/tests/throughput.c:113:68: note: in expansion of macro ‘RAND’
#  111|       engine = soxr_engine(soxr);
#  112|       switch (itype & 3) {
#  113|->       case 0: for (i=0;i<ilen*chans; ((float   *)ibuf)[i]=(float  )RAND, ++i); break;
#  114|         case 1: for (i=0;i<ilen*chans; ((double  *)ibuf)[i]=(double )RAND, ++i); break;
#  115|         case 2: for (i=0;i<ilen*chans; ((int32_t *)ibuf)[i]=rint32(65536.*32768*RAND), ++i); break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def38]
soxr-0.1.3-build/soxr-0.1.3-Source/tests/throughput.c:114:58: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ibuf’
soxr-0.1.3-build/soxr-0.1.3-Source/tests/throughput.c:105:21: note: in expansion of macro ‘ranqd1’
soxr-0.1.3-build/soxr-0.1.3-Source/tests/throughput.c:106:15: note: in expansion of macro ‘dranqd1’
soxr-0.1.3-build/soxr-0.1.3-Source/tests/throughput.c:114:68: note: in expansion of macro ‘RAND’
#  112|       switch (itype & 3) {
#  113|         case 0: for (i=0;i<ilen*chans; ((float   *)ibuf)[i]=(float  )RAND, ++i); break;
#  114|->       case 1: for (i=0;i<ilen*chans; ((double  *)ibuf)[i]=(double )RAND, ++i); break;
#  115|         case 2: for (i=0;i<ilen*chans; ((int32_t *)ibuf)[i]=rint32(65536.*32768*RAND), ++i); break;
#  116|         case 3: for (i=0;i<ilen*chans; ((int16_t *)ibuf)[i]=rint16(    1.*32768*RAND), ++i); break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def39]
soxr-0.1.3-build/soxr-0.1.3-Source/tests/throughput.c:115:58: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ibuf’
soxr-0.1.3-build/soxr-0.1.3-Source/tests/throughput.c:105:21: note: in expansion of macro ‘ranqd1’
soxr-0.1.3-build/soxr-0.1.3-Source/tests/throughput.c:106:15: note: in expansion of macro ‘dranqd1’
soxr-0.1.3-build/soxr-0.1.3-Source/tests/throughput.c:115:79: note: in expansion of macro ‘RAND’
#  113|         case 0: for (i=0;i<ilen*chans; ((float   *)ibuf)[i]=(float  )RAND, ++i); break;
#  114|         case 1: for (i=0;i<ilen*chans; ((double  *)ibuf)[i]=(double )RAND, ++i); break;
#  115|->       case 2: for (i=0;i<ilen*chans; ((int32_t *)ibuf)[i]=rint32(65536.*32768*RAND), ++i); break;
#  116|         case 3: for (i=0;i<ilen*chans; ((int16_t *)ibuf)[i]=rint16(    1.*32768*RAND), ++i); break;
#  117|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def40]
soxr-0.1.3-build/soxr-0.1.3-Source/tests/throughput.c:116:58: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ibuf’
soxr-0.1.3-build/soxr-0.1.3-Source/tests/throughput.c:105:21: note: in expansion of macro ‘ranqd1’
soxr-0.1.3-build/soxr-0.1.3-Source/tests/throughput.c:106:15: note: in expansion of macro ‘dranqd1’
soxr-0.1.3-build/soxr-0.1.3-Source/tests/throughput.c:116:79: note: in expansion of macro ‘RAND’
#  114|         case 1: for (i=0;i<ilen*chans; ((double  *)ibuf)[i]=(double )RAND, ++i); break;
#  115|         case 2: for (i=0;i<ilen*chans; ((int32_t *)ibuf)[i]=rint32(65536.*32768*RAND), ++i); break;
#  116|->       case 3: for (i=0;i<ilen*chans; ((int16_t *)ibuf)[i]=rint16(    1.*32768*RAND), ++i); break;
#  117|       }
#  118|                                                          /* Resample in blocks: */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def41]
soxr-0.1.3-build/soxr-0.1.3-Source/tests/vector-cmp.c: scope_hint: In function ‘main’
soxr-0.1.3-build/soxr-0.1.3-Source/tests/vector-cmp.c:28:51: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(arg[1], "rb")’
soxr-0.1.3-build/soxr-0.1.3-Source/src/rint.h:97:19: note: in expansion of macro ‘rint32D’
soxr-0.1.3-build/soxr-0.1.3-Source/tests/vector-cmp.c: scope_hint: In function ‘main’
#   26|   {
#   27|     int     two      = !!arg[2][0];
#   28|->   FILE    * f1 = fopen(arg[1], "rb"), * f2 = two? fopen(arg[2], "rb") : 0;
#   29|     double  rate     = atof (arg[3]), /* Sample-rate */
#   30|             skip_len = atof (arg[4]), /* Skip length in seconds */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
soxr-0.1.3-build/soxr-0.1.3-Source/tests/vector-cmp.c:28:51: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(arg[1], "rb")’
soxr-0.1.3-build/soxr-0.1.3-Source/src/rint.h:97:19: note: in expansion of macro ‘rint32D’
soxr-0.1.3-build/soxr-0.1.3-Source/tests/vector-cmp.c: scope_hint: In function ‘main’
#   26|   {
#   27|     int     two      = !!arg[2][0];
#   28|->   FILE    * f1 = fopen(arg[1], "rb"), * f2 = two? fopen(arg[2], "rb") : 0;
#   29|     double  rate     = atof (arg[3]), /* Sample-rate */
#   30|             skip_len = atof (arg[4]), /* Skip length in seconds */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def43]
soxr-0.1.3-build/soxr-0.1.3-Source/tests/vector-cmp.c:29:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(arg[1], "rb")’
#   27|     int     two      = !!arg[2][0];
#   28|     FILE    * f1 = fopen(arg[1], "rb"), * f2 = two? fopen(arg[2], "rb") : 0;
#   29|->   double  rate     = atof (arg[3]), /* Sample-rate */
#   30|             skip_len = atof (arg[4]), /* Skip length in seconds */
#   31|             len      = atof (arg[5]), /* Compare length in seconds */ r;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
soxr-0.1.3-build/soxr-0.1.3-Source/tests/vector-cmp.c:29:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(arg[1], "rb")’
#   27|     int     two      = !!arg[2][0];
#   28|     FILE    * f1 = fopen(arg[1], "rb"), * f2 = two? fopen(arg[2], "rb") : 0;
#   29|->   double  rate     = atof (arg[3]), /* Sample-rate */
#   30|             skip_len = atof (arg[4]), /* Skip length in seconds */
#   31|             len      = atof (arg[5]), /* Compare length in seconds */ r;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def45]
soxr-0.1.3-build/soxr-0.1.3-Source/tests/vector-cmp.c:35:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fopen(arg[1], "rb")’ where non-null expected
soxr-0.1.3-build/soxr-0.1.3-Source/tests/vector-cmp.c:9: included_from: Included from here.
/usr/include/stdio.h:769:12: note: argument 1 of ‘fseek’ must be non-null
#   33|     sample_t s1, s2;
#   34|   
#   35|->   fseek(f1, rint32(rate * skip_len) * (int)sizeof(s1), SEEK_CUR);
#   36|     if (two) {
#   37|       fseek(f2, rint32(rate * skip_len) * (int)sizeof(s2), SEEK_CUR);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def46]
soxr-0.1.3-build/soxr-0.1.3-Source/tests/vector-cmp.c:37:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘f2’ where non-null expected
soxr-0.1.3-build/soxr-0.1.3-Source/src/rint.h:97:19: note: in expansion of macro ‘rint32D’
soxr-0.1.3-build/soxr-0.1.3-Source/tests/vector-cmp.c: scope_hint: In function ‘main’
/usr/include/stdio.h:769:12: note: argument 1 of ‘fseek’ must be non-null
#   35|     fseek(f1, rint32(rate * skip_len) * (int)sizeof(s1), SEEK_CUR);
#   36|     if (two) {
#   37|->     fseek(f2, rint32(rate * skip_len) * (int)sizeof(s2), SEEK_CUR);
#   38|       for (; i < count &&
#   39|           fread(&s1, sizeof(s1), 1, f1) &&

Error: GCC_ANALYZER_WARNING (CWE-775): [#def47]
soxr-0.1.3-build/soxr-0.1.3-Source/tests/vector-gen.c: scope_hint: In function ‘main’
soxr-0.1.3-build/soxr-0.1.3-Source/tests/vector-gen.c:54:37: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(argv[7], "wb")’
#   52|          m = (f2 - f1) / (rate * len * 2), dummy;
#   53|     FILE * file = fopen(argv[7], "wb");
#   54|->   int i = (int)n1, err = !file || i != n1;
#   55|     for (; !err && i < (int)(rate*(len+lead_in_len)+.5); ++i) {
#   56|       real d = sin(2 * PI * modf((f1 + i * m) * i / rate, &dummy));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
soxr-0.1.3-build/soxr-0.1.3-Source/tests/vector-gen.c:54:37: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(argv[7], "wb")’
#   52|          m = (f2 - f1) / (rate * len * 2), dummy;
#   53|     FILE * file = fopen(argv[7], "wb");
#   54|->   int i = (int)n1, err = !file || i != n1;
#   55|     for (; !err && i < (int)(rate*(len+lead_in_len)+.5); ++i) {
#   56|       real d = sin(2 * PI * modf((f1 + i * m) * i / rate, &dummy));

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-57.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namesoxr-0.1.3-17.fc42
store-results-to/tmp/tmpwrgrbci1/soxr-0.1.3-17.fc42.tar.xz
time-created2024-11-13 03:17:12
time-finished2024-11-13 03:18:47
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpwrgrbci1/soxr-0.1.3-17.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpwrgrbci1/soxr-0.1.3-17.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9