Skip to content

Compiler warnings in lib_enc/enc_higher_acelp_fx.c

Basic info

  • Float reference:
    • Encoder (float): n/a
    • Decoder (float): n/a
  • Fixed point:

Bug description

Using gcc (Debian 12.2.0-14) 12.2.0, the following compiler warnings are output in lib_enc/enc_higher_acelp_fx.c:

lib_enc/enc_higher_acelp_fx.c: In function 'transf_cdbk_enc_fx':
lib_enc/enc_higher_acelp_fx.c:293:5: warning: 'set16_fx' accessing 2 bytes in a region of size 0 [-Wstringop-overflow=]
  293 |     set16_fx( x_tran + Nsv * WIDTH_BAND, 0, sub( L_SUBFR, i_mult2( WIDTH_BAND, Nsv ) ) );
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib_enc/enc_higher_acelp_fx.c:293:5: note: referencing argument 1 of type 'Word16[0]' {aka 'short int[]'}
In file included from lib_enc/enc_higher_acelp_fx.c:7:
lib_com/prot_fx.h:205:6: note: in a call to function 'set16_fx'
  205 | void set16_fx(
      |      ^~~~~~~~
lib_enc/enc_higher_acelp_fx.c: In function 'transf_cdbk_enc_ivas_fx':
lib_enc/enc_higher_acelp_fx.c:646:5: warning: 'set16_fx' accessing 2 bytes in a region of size 0 [-Wstringop-overflow=]
  646 |     set16_fx( x_tran + Nsv * WIDTH_BAND, 0, sub( L_SUBFR, i_mult2( WIDTH_BAND, Nsv ) ) );
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib_enc/enc_higher_acelp_fx.c:646:5: note: referencing argument 1 of type 'Word16[0]' {aka 'short int[]'}
lib_com/prot_fx.h:205:6: note: in a call to function 'set16_fx'
  205 | void set16_fx(
      |      ^~~~~~~~
lib_enc/enc_higher_acelp_fx.c: In function 'transf_cdbk_enc_fx':
lib_enc/enc_higher_acelp_fx.c:293:5: warning: 'set16_fx' accessing 2 bytes in a region of size 0 [-Wstringop-overflow=]
  293 |     set16_fx( x_tran + Nsv * WIDTH_BAND, 0, sub( L_SUBFR, i_mult2( WIDTH_BAND, Nsv ) ) );
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib_enc/enc_higher_acelp_fx.c:293:5: note: referencing argument 1 of type 'Word16[0]' {aka 'short int[]'}
lib_com/prot_fx.h:205:6: note: in a call to function 'set16_fx'
  205 | void set16_fx(
      |      ^~~~~~~~
lib_enc/enc_higher_acelp_fx.c: In function 'transf_cdbk_enc_ivas_fx':
lib_enc/enc_higher_acelp_fx.c:646:5: warning: 'set16_fx' accessing 2 bytes in a region of size 0 [-Wstringop-overflow=]
  646 |     set16_fx( x_tran + Nsv * WIDTH_BAND, 0, sub( L_SUBFR, i_mult2( WIDTH_BAND, Nsv ) ) );
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib_enc/enc_higher_acelp_fx.c:646:5: note: referencing argument 1 of type 'Word16[0]' {aka 'short int[]'}
lib_com/prot_fx.h:205:6: note: in a call to function 'set16_fx'
  205 | void set16_fx(
      |      ^~~~~~~~