On Thursday, April 8, 2021 2:30:42 AM CEST Paul Eggert wrote: > Although the old code was technically correct, this was accidental > and it understandably confused Coverity. Reported by Ondrej Dubaj in: > https://lists.gnu.org/r/bug-tar/2021-04/msg00000.html
The warning[-Wstringop-overflow=] reports you refer to come from GCC actually. > * lib/utimens.c (update_timespec): Change arg type from ‘struct > timespec *[2]’ (pointer to array of 2 pointers to timespecs) to > ‘struct timespec **’ (pointer to pointer to the first timespec in > an array of 2 timespecs). Although the old code happened to be > technically correct, it was misleading and confused Coverity. > And though the type ‘struct timespec (**)[2]’ (pointer to pointer > to array of 2 timespecs) would perhaps be more technically > correct, it would be almost as confusing and would require changes > elsewhere in this file; let’s quit while we’re ahead. The change indeed eliminated the GCC warnings. Thanks! Kamil