vp9_bitstream.c: quiet -Wstringop-overflow warning
authorJames Zern <jzern@google.com>
Fri, 10 Dec 2021 01:32:30 +0000 (17:32 -0800)
committerJames Zern <jzern@google.com>
Fri, 10 Dec 2021 01:36:31 +0000 (17:36 -0800)
commitf3e2a690cd474eae47376b431f5bddf6d73e377c
treee88df8b4cf4c726a1d1e20164bbfa6fb4f541861
parent7fbcee49da63a61feee00147746efa33e31087e8
vp9_bitstream.c: quiet -Wstringop-overflow warning

w/gcc-11

as noted in
the size of interp_filter_selected[][]'s first dimension varies between
VP9_COMP and VP9BitstreamWorkerData as noted in the latter's definition:
  // The size of interp_filter_selected in VP9_COMP is actually
  // MAX_REFERENCE_FRAMES x SWITCHABLE. But when encoding tiles, all we ever do
  // is increment the very first index (index 0) for the first dimension. Hence
  // this is sufficient.
  int interp_filter_selected[1][SWITCHABLE];

normalize the function signatures of write_modes*(), etc. to take this
into account.

vp9/encoder/vp9_bitstream.c|948 col 3| warning: ‘write_modes’ accessing
64 bytes in a region of size 16 [-Wstringop-overflow=]
||   948 |   write_modes(cpi, xd, &cpi->tile_data[data->tile_idx].tile_info,
||       |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
||   949 |               &data->bit_writer, tile_row, data->tile_idx,
||       |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
||   950 |               &data->max_mv_magnitude, data->interp_filter_selected);
||       |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vp9/encoder/vp9_bitstream.c|948 col 3| note: referencing argument 8 of
type ‘int (*)[4]’
vp9/encoder/vp9_bitstream.c|488 col 13| note: in a call to function
‘write_modes’

Change-Id: I0898cd7c3431633c382a0c3a1be2f0a0bea8d0f9
vp9/encoder/vp9_bitstream.c