Skip to content

Resolve "Warnings with gcc 12.2.0 (Debian 12)"

malenovsky requested to merge 938-warnings-with-gcc-12-2-0-debian-12 into main

Reason why this change is needed

gcc 12.2.0 produces the following warning when compiling with the Makefile

lib_enc/enc_higher_acelp.c:245:5: note: referencing argument 1 of type ‘float[0]’
In file included from lib_enc/enc_higher_acelp.c:44:
lib_com/prot.h:195:6: note: in a call to function ‘set_f’
  195 | void set_f(
      |      ^~~~~
lib_enc/enc_higher_acelp.c:245:5: warning: ‘set_f’ accessing 4 bytes in a region of size 0 [-Wstringop-overflow=]
  245 |     set_f( x_tran + Nsv * WIDTH_BAND, 0.0f, L_SUBFR - WIDTH_BAND * Nsv );
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib_enc/enc_higher_acelp.c:245:5: note: referencing argument 1 of type ‘float[0]’
lib_com/prot.h:195:6: note: in a call to function ‘set_f’
  195 | void set_f(
      |      ^~~~~

Description of the change

The entire line containing set_f() shall be removed because Nsv is fixed to 8 and the third argument always evaluates to 0.

Affected operating points

None. Pure BE change.

Merge request reports

Loading