From: Keith Packard Date: Fri, 17 Apr 2020 19:51:13 +0000 (-0700) Subject: ao-tools: Use array indexing instead of addition to make gcc-10 happy X-Git-Tag: 1.9.3~1^2~44 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=c2acda26c1e4e0d7ffda9cd985180562f61aa88b;hp=c2acda26c1e4e0d7ffda9cd985180562f61aa88b;p=fw%2Faltos 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 ---