a52dec-0.7.4-50.fc43

List of Findings

Error: COMPILER_WARNING (CWE-9001): [#def1]
a52dec-0.7.4/include/audio_out.h:43:31: warning[-Wattributes]: ‘always_inline’ function might not be inlinable unless also declared ‘inline’
#   43 | static inline ao_instance_t * ao_open (ao_open_t * open)
#      |                               ^~~~~~~
#   41|   ao_driver_t * ao_drivers (void);
#   42|   
#   43|-> static inline ao_instance_t * ao_open (ao_open_t * open)
#   44|   {
#   45|       return open ();

Error: COMPILER_WARNING (CWE-1164): [#def2]
a52dec-0.7.4/include/audio_out.h:43:31: warning[-Wunused-function]: ‘ao_open’ defined but not used
#   43 | static inline ao_instance_t * ao_open (ao_open_t * open)
#      |                               ^~~~~~~
#   41|   ao_driver_t * ao_drivers (void);
#   42|   
#   43|-> static inline ao_instance_t * ao_open (ao_open_t * open)
#   44|   {
#   45|       return open ();

Error: COMPILER_WARNING (CWE-9001): [#def3]
a52dec-0.7.4/include/audio_out.h:48:19: warning[-Wattributes]: ‘always_inline’ function might not be inlinable unless also declared ‘inline’
#   48 | static inline int ao_setup (ao_instance_t * instance, int sample_rate,
#      |                   ^~~~~~~~
#   46|   }
#   47|   
#   48|-> static inline int ao_setup (ao_instance_t * instance, int sample_rate,
#   49|   			    int * flags, sample_t * level, sample_t * bias)
#   50|   {

Error: COMPILER_WARNING (CWE-1164): [#def4]
a52dec-0.7.4/include/audio_out.h:48:19: warning[-Wunused-function]: ‘ao_setup’ defined but not used
#   48 | static inline int ao_setup (ao_instance_t * instance, int sample_rate,
#      |                   ^~~~~~~~
#   46|   }
#   47|   
#   48|-> static inline int ao_setup (ao_instance_t * instance, int sample_rate,
#   49|   			    int * flags, sample_t * level, sample_t * bias)
#   50|   {

Error: COMPILER_WARNING (CWE-9001): [#def5]
a52dec-0.7.4/include/audio_out.h:54:19: warning[-Wattributes]: ‘always_inline’ function might not be inlinable unless also declared ‘inline’
#   54 | static inline int ao_play (ao_instance_t * instance, int flags,
#      |                   ^~~~~~~
#   52|   }
#   53|   
#   54|-> static inline int ao_play (ao_instance_t * instance, int flags,
#   55|   			   sample_t * samples)
#   56|   {

Error: COMPILER_WARNING (CWE-1164): [#def6]
a52dec-0.7.4/include/audio_out.h:54:19: warning[-Wunused-function]: ‘ao_play’ defined but not used
#   54 | static inline int ao_play (ao_instance_t * instance, int flags,
#      |                   ^~~~~~~
#   52|   }
#   53|   
#   54|-> static inline int ao_play (ao_instance_t * instance, int flags,
#   55|   			   sample_t * samples)
#   56|   {

Error: COMPILER_WARNING (CWE-9001): [#def7]
a52dec-0.7.4/libao/audio_out_float.c:30: included_from: Included from here.
a52dec-0.7.4/include/audio_out.h:60:20: warning[-Wattributes]: ‘always_inline’ function might not be inlinable unless also declared ‘inline’
#   60 | static inline void ao_close (ao_instance_t * instance)
#      |                    ^~~~~~~~
#   58|   }
#   59|   
#   60|-> static inline void ao_close (ao_instance_t * instance)
#   61|   {
#   62|       if (instance->close)

Error: COMPILER_WARNING (CWE-1164): [#def8]
a52dec-0.7.4/include/audio_out.h:60:20: warning[-Wunused-function]: ‘ao_close’ defined but not used
#   60 | static inline void ao_close (ao_instance_t * instance)
#      |                    ^~~~~~~~
#   58|   }
#   59|   
#   60|-> static inline void ao_close (ao_instance_t * instance)
#   61|   {
#   62|       if (instance->close)

Error: COMPILER_WARNING (CWE-9001): [#def9]
a52dec-0.7.4/liba52/bitstream.c:44:20: warning[-Wattributes]: 'always_inline' function might not be inlinable unless also declared 'inline'
#   44 | static inline void bitstream_fill_current (a52_state_t * state)
#      |                    ^~~~~~~~~~~~~~~~~~~~~~
#   42|   }
#   43|   
#   44|-> static inline void bitstream_fill_current (a52_state_t * state)
#   45|   {
#   46|       uint32_t tmp;

Error: COMPILER_WARNING (CWE-9001): [#def10]
a52dec-0.7.4/liba52/bitstream.c:44:20: warning[-Wattributes]: 'always_inline' function might not be inlinable unless also declared 'inline'
#   42|   }
#   43|   
#   44|-> static inline void bitstream_fill_current (a52_state_t * state)
#   45|   {
#   46|       uint32_t tmp;

Error: GCC_ANALYZER_WARNING (CWE-1335): [#def11]
a52dec-0.7.4/liba52/bitstream.c:66:5: warning[-Wanalyzer-shift-count-overflow]: shift by count ('32') >= precision of type ('32')
a52dec-0.7.4/liba52/bitstream.c:34:6: enter_function: entry to 'a52_bitstream_set_ptr'
a52dec-0.7.4/liba52/bitstream.c:41:5: call_function: inlined call to 'bitstream_get' from 'a52_bitstream_set_ptr'
#   64|   
#   65|       num_bits -= state->bits_left;
#   66|->     result = ((state->current_word << (32 - state->bits_left)) >>
#   67|   	      (32 - state->bits_left));
#   68|   

Error: GCC_ANALYZER_WARNING (CWE-1335): [#def12]
a52dec-0.7.4/liba52/bitstream.c:66:15: warning[-Wanalyzer-shift-count-overflow]: shift by count ('32') >= precision of type ('32')
a52dec-0.7.4/liba52/bitstream.c:34:6: enter_function: entry to 'a52_bitstream_set_ptr'
a52dec-0.7.4/liba52/bitstream.c:41:5: call_function: inlined call to 'bitstream_get' from 'a52_bitstream_set_ptr'
#   64|   
#   65|       num_bits -= state->bits_left;
#   66|->     result = ((state->current_word << (32 - state->bits_left)) >>
#   67|   	      (32 - state->bits_left));
#   68|   

Error: COMPILER_WARNING (CWE-9001): [#def13]
a52dec-0.7.4/liba52/bitstream.h:53:24: warning[-Wattributes]: 'always_inline' function might not be inlinable unless also declared 'inline'
#   53 | static inline uint32_t bitstream_get (a52_state_t * state, uint32_t num_bits)
#      |                        ^~~~~~~~~~~~~
#   51|   int32_t a52_bitstream_get_bh_2 (a52_state_t * state, uint32_t num_bits);
#   52|   
#   53|-> static inline uint32_t bitstream_get (a52_state_t * state, uint32_t num_bits)
#   54|   {
#   55|       uint32_t result;

Error: COMPILER_WARNING (CWE-9001): [#def14]
a52dec-0.7.4/liba52/bitstream.h:53:24: warning[-Wattributes]: 'always_inline' function might not be inlinable unless also declared 'inline'
#   51|   int32_t a52_bitstream_get_bh_2 (a52_state_t * state, uint32_t num_bits);
#   52|   
#   53|-> static inline uint32_t bitstream_get (a52_state_t * state, uint32_t num_bits)
#   54|   {
#   55|       uint32_t result;

Error: COMPILER_WARNING (CWE-9001): [#def15]
a52dec-0.7.4/liba52/bitstream.c:30: included_from: Included from here.
a52dec-0.7.4/liba52/bitstream.h:66:23: warning[-Wattributes]: 'always_inline' function might not be inlinable unless also declared 'inline'
#   66 | static inline int32_t bitstream_get_2 (a52_state_t * state, uint32_t num_bits)
#      |                       ^~~~~~~~~~~~~~~
#   64|   }
#   65|   
#   66|-> static inline int32_t bitstream_get_2 (a52_state_t * state, uint32_t num_bits)
#   67|   {
#   68|       int32_t result;

Error: COMPILER_WARNING (CWE-9001): [#def16]
a52dec-0.7.4/liba52/bitstream.h:66:23: warning[-Wattributes]: 'always_inline' function might not be inlinable unless also declared 'inline'
#   64|   }
#   65|   
#   66|-> static inline int32_t bitstream_get_2 (a52_state_t * state, uint32_t num_bits)
#   67|   {
#   68|       int32_t result;

Error: COMPILER_WARNING (CWE-1164): [#def17]
a52dec-0.7.4/liba52/bitstream.h:66:23: warning[-Wunused-function]: 'bitstream_get_2' defined but not used
#   66 | static inline int32_t bitstream_get_2 (a52_state_t * state, uint32_t num_bits)
#      |                       ^~~~~~~~~~~~~~~
#   64|   }
#   65|   
#   66|-> static inline int32_t bitstream_get_2 (a52_state_t * state, uint32_t num_bits)
#   67|   {
#   68|       int32_t result;

Error: COMPILER_WARNING (CWE-9001): [#def18]
a52dec-0.7.4/liba52/imdct.c:76:20: warning[-Wattributes]: 'always_inline' function might not be inlinable unless also declared 'inline'
#   76 | static inline void ifft2 (complex_t * buf)
#      |                    ^~~~~
#   74|   static void (* ifft64) (complex_t * buf);
#   75|   
#   76|-> static inline void ifft2 (complex_t * buf)
#   77|   {
#   78|       double r, i;

Error: COMPILER_WARNING (CWE-9001): [#def19]
a52dec-0.7.4/liba52/imdct.c:76:20: warning[-Wattributes]: 'always_inline' function might not be inlinable unless also declared 'inline'
#   74|   static void (* ifft64) (complex_t * buf);
#   75|   
#   76|-> static inline void ifft2 (complex_t * buf)
#   77|   {
#   78|       double r, i;

Error: COMPILER_WARNING (CWE-9001): [#def20]
a52dec-0.7.4/liba52/imdct.c:88:20: warning[-Wattributes]: 'always_inline' function might not be inlinable unless also declared 'inline'
#   88 | static inline void ifft4 (complex_t * buf)
#      |                    ^~~~~
#   86|   }
#   87|   
#   88|-> static inline void ifft4 (complex_t * buf)
#   89|   {
#   90|       double tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8;

Error: COMPILER_WARNING (CWE-9001): [#def21]
a52dec-0.7.4/liba52/imdct.c:88:20: warning[-Wattributes]: 'always_inline' function might not be inlinable unless also declared 'inline'
#   86|   }
#   87|   
#   88|-> static inline void ifft4 (complex_t * buf)
#   89|   {
#   90|       double tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8;

Error: COMPILER_WARNING (CWE-9001): [#def22]
a52dec-0.7.4/liba52/imdct.c:170:20: warning[-Wattributes]: 'always_inline' function might not be inlinable unless also declared 'inline'
#  170 | static inline void ifft8 (complex_t * buf)
#      |                    ^~~~~
#  168|   } while (0)
#  169|   
#  170|-> static inline void ifft8 (complex_t * buf)
#  171|   {
#  172|       double tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8;

Error: COMPILER_WARNING (CWE-9001): [#def23]
a52dec-0.7.4/liba52/imdct.c:170:20: warning[-Wattributes]: 'always_inline' function might not be inlinable unless also declared 'inline'
#  168|   } while (0)
#  169|   
#  170|-> static inline void ifft8 (complex_t * buf)
#  171|   {
#  172|       double tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8;

Error: COMPILER_WARNING (CWE-9001): [#def24]
a52dec-0.7.4/liba52/parse.c:292:19: warning[-Wattributes]: 'always_inline' function might not be inlinable unless also declared 'inline'
#  292 | static inline int zero_snr_offsets (int nfchans, a52_state_t * state)
#      |                   ^~~~~~~~~~~~~~~~
#  290|   }
#  291|   
#  292|-> static inline int zero_snr_offsets (int nfchans, a52_state_t * state)
#  293|   {
#  294|       int i;

Error: COMPILER_WARNING (CWE-9001): [#def25]
a52dec-0.7.4/liba52/parse.c:292:19: warning[-Wattributes]: 'always_inline' function might not be inlinable unless also declared 'inline'
#  290|   }
#  291|   
#  292|-> static inline int zero_snr_offsets (int nfchans, a52_state_t * state)
#  293|   {
#  294|       int i;

Error: COMPILER_WARNING (CWE-9001): [#def26]
a52dec-0.7.4/liba52/parse.c:306:23: warning[-Wattributes]: 'always_inline' function might not be inlinable unless also declared 'inline'
#  306 | static inline int16_t dither_gen (a52_state_t * state)
#      |                       ^~~~~~~~~~
#  304|   }
#  305|   
#  306|-> static inline int16_t dither_gen (a52_state_t * state)
#  307|   {
#  308|       int16_t nstate;

Error: COMPILER_WARNING (CWE-9001): [#def27]
a52dec-0.7.4/liba52/parse.c:306:23: warning[-Wattributes]: 'always_inline' function might not be inlinable unless also declared 'inline'
#  304|   }
#  305|   
#  306|-> static inline int16_t dither_gen (a52_state_t * state)
#  307|   {
#  308|       int16_t nstate;

Error: COMPILER_WARNING (CWE-9001): [#def28]
a52dec-0.7.4/libao/../include/audio_out.h:43:31: warning[-Wattributes]: ‘always_inline’ function might not be inlinable unless also declared ‘inline’
#   41|   ao_driver_t * ao_drivers (void);
#   42|   
#   43|-> static inline ao_instance_t * ao_open (ao_open_t * open)
#   44|   {
#   45|       return open ();

Error: COMPILER_WARNING (CWE-9001): [#def29]
a52dec-0.7.4/libao/../include/audio_out.h:48:19: warning[-Wattributes]: ‘always_inline’ function might not be inlinable unless also declared ‘inline’
#   46|   }
#   47|   
#   48|-> static inline int ao_setup (ao_instance_t * instance, int sample_rate,
#   49|   			    int * flags, sample_t * level, sample_t * bias)
#   50|   {

Error: COMPILER_WARNING (CWE-9001): [#def30]
a52dec-0.7.4/libao/../include/audio_out.h:54:19: warning[-Wattributes]: ‘always_inline’ function might not be inlinable unless also declared ‘inline’
#   52|   }
#   53|   
#   54|-> static inline int ao_play (ao_instance_t * instance, int flags,
#   55|   			   sample_t * samples)
#   56|   {

Error: COMPILER_WARNING (CWE-9001): [#def31]
a52dec-0.7.4/libao/../include/audio_out.h:60:20: warning[-Wattributes]: ‘always_inline’ function might not be inlinable unless also declared ‘inline’
#   58|   }
#   59|   
#   60|-> static inline void ao_close (ao_instance_t * instance)
#   61|   {
#   62|       if (instance->close)

Error: COMPILER_WARNING (CWE-252): [#def32]
a52dec-0.7.4/libao/audio_out_oss.c: scope_hint: In function ‘oss_play’
a52dec-0.7.4/libao/audio_out_oss.c:127:5: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  127 |     write (instance->fd, int16_samples, 256 * sizeof (int16_t) * chans);
#      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  125|   
#  126|       float2s16_multi (samples, int16_samples, flags);
#  127|->     write (instance->fd, int16_samples, 256 * sizeof (int16_t) * chans);
#  128|   
#  129|       return 0;

Error: COMPILER_WARNING (CWE-9001): [#def33]
a52dec-0.7.4/libao/float2s16.c:31:23: warning[-Wattributes]: ‘always_inline’ function might not be inlinable unless also declared ‘inline’
#   31 | static inline int16_t convert (int32_t i)
#      |                       ^~~~~~~
#   29|   #include "audio_out.h"
#   30|   
#   31|-> static inline int16_t convert (int32_t i)
#   32|   {
#   33|       if (i > 0x43c07fff)

Error: COMPILER_WARNING (CWE-9001): [#def34]
a52dec-0.7.4/libao/float2s16.c:31:23: warning[-Wattributes]: ‘always_inline’ function might not be inlinable unless also declared ‘inline’
#   29|   #include "audio_out.h"
#   30|   
#   31|-> static inline int16_t convert (int32_t i)
#   32|   {
#   33|       if (i > 0x43c07fff)

Error: GCC_ANALYZER_WARNING (CWE-617): [#def35]
a52dec-0.7.4/src/extract_a52.c:331:17: warning[-Wanalyzer-tainted-assertion]: use of attacked-controlled value in condition for assertion
a52dec-0.7.4/src/extract_a52.c:348:5: enter_function: entry to ‘main’
a52dec-0.7.4/src/extract_a52.c:354:5: call_function: calling ‘handle_args’ from ‘main’
a52dec-0.7.4/src/extract_a52.c:354:5: return_function: returning to ‘main’ from ‘handle_args’
a52dec-0.7.4/src/extract_a52.c:356:8: branch_true: following ‘true’ branch...
a52dec-0.7.4/src/extract_a52.c:357:9: branch_true: ...to here
a52dec-0.7.4/src/extract_a52.c:357:9: call_function: calling ‘ts_loop’ from ‘main’
#  329|   	    if (buf[0] != 0x47) {
#  330|   		fprintf (stderr, "bad sync byte\n");
#  331|-> 		exit (1);
#  332|   	    }
#  333|   	    pid = ((buf[1] << 8) + buf[2]) & 0x1fff;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def36]
a52dec-0.7.4/test/compare.c:40:10: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(argv[1], "rb")’
a52dec-0.7.4/test/compare.c:37:8: branch_false: following ‘false’ branch (when ‘argc == 3’)...
a52dec-0.7.4/test/compare.c:39:10: branch_false: ...to here
a52dec-0.7.4/test/compare.c:39:10: acquire_resource: opened here
a52dec-0.7.4/test/compare.c:41:8: branch_true: following ‘true’ branch...
a52dec-0.7.4/test/compare.c:42:9: branch_true: ...to here
a52dec-0.7.4/test/compare.c:40:10: danger: ‘fopen(argv[1], "rb")’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   38|   	return 1;
#   39|       f1 = fopen (argv[1], "rb");
#   40|->     f2 = fopen (argv[2], "rb");
#   41|       if ((f1 == NULL) || (f2 == NULL)) {
#   42|   	printf ("cannot open file %s\n", (f1 == NULL) ? argv[1] : argv[2]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
a52dec-0.7.4/test/compare.c:40:10: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(argv[1], "rb")’
a52dec-0.7.4/test/compare.c:37:8: branch_false: following ‘false’ branch (when ‘argc == 3’)...
a52dec-0.7.4/test/compare.c:39:10: branch_false: ...to here
a52dec-0.7.4/test/compare.c:39:10: acquire_memory: allocated here
a52dec-0.7.4/test/compare.c:41:8: branch_true: following ‘true’ branch...
a52dec-0.7.4/test/compare.c:42:9: branch_true: ...to here
a52dec-0.7.4/test/compare.c:40:10: danger: ‘fopen(argv[1], "rb")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   38|   	return 1;
#   39|       f1 = fopen (argv[1], "rb");
#   40|->     f2 = fopen (argv[2], "rb");
#   41|       if ((f1 == NULL) || (f2 == NULL)) {
#   42|   	printf ("cannot open file %s\n", (f1 == NULL) ? argv[1] : argv[2]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def38]
a52dec-0.7.4/test/compare.c:41:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(argv[2], "rb")’
a52dec-0.7.4/test/compare.c:37:8: branch_false: following ‘false’ branch (when ‘argc == 3’)...
a52dec-0.7.4/test/compare.c:39:10: branch_false: ...to here
a52dec-0.7.4/test/compare.c:40:10: acquire_resource: opened here
a52dec-0.7.4/test/compare.c:41:9: danger: ‘fopen(argv[2], "rb")’ leaks here; was opened at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#   39|       f1 = fopen (argv[1], "rb");
#   40|       f2 = fopen (argv[2], "rb");
#   41|->     if ((f1 == NULL) || (f2 == NULL)) {
#   42|   	printf ("cannot open file %s\n", (f1 == NULL) ? argv[1] : argv[2]);
#   43|   	return 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
a52dec-0.7.4/test/compare.c:41:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(argv[2], "rb")’
a52dec-0.7.4/test/compare.c:37:8: branch_false: following ‘false’ branch (when ‘argc == 3’)...
a52dec-0.7.4/test/compare.c:39:10: branch_false: ...to here
a52dec-0.7.4/test/compare.c:40:10: acquire_memory: allocated here
a52dec-0.7.4/test/compare.c:41:9: danger: ‘fopen(argv[2], "rb")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#   39|       f1 = fopen (argv[1], "rb");
#   40|       f2 = fopen (argv[2], "rb");
#   41|->     if ((f1 == NULL) || (f2 == NULL)) {
#   42|   	printf ("cannot open file %s\n", (f1 == NULL) ? argv[1] : argv[2]);
#   43|   	return 1;

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-101.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namea52dec-0.7.4-50.fc43
store-results-to/tmp/tmpzuvt5389/a52dec-0.7.4-50.fc43.tar.xz
time-created2025-04-25 11:59:50
time-finished2025-04-25 12:01:12
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpzuvt5389/a52dec-0.7.4-50.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpzuvt5389/a52dec-0.7.4-50.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9