ao-tools: Use array indexing instead of addition to make gcc-10 happy
authorKeith Packard <keithp@keithp.com>
Fri, 17 Apr 2020 19:51:13 +0000 (12:51 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 17 Apr 2020 19:51:13 +0000 (12:51 -0700)
commit8964f69d5344efb747027e142e304cc55c14c308
treed856df54c27374dbb6c0b578622a801d3af9a15b
parent98c20e141c0b74932578d19b1ea2c74a4a906164
ao-tools: Use array indexing instead of addition to make gcc-10 happy

A struct with a trailing zero-length array (for variable-length data) is
treated as a zero-sized object when doing pointer arithmetic, but treated
correctly when treated as an array. This generates a warning from gcc-10

load->data + address - load->address

while this, which is 'the same', does not:

&load->data[address - load->address]

Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools/lib/ao-editaltos.c