Pacify GCC 16.1 -Wanalyzer-use-of-uninitialized-value

This fixes a false positive with gcc 16.1.1 20260501 (Red Hat
16.1.1-1) on x86-64.
* src/extract.c (set_stat): Use differently-worded but equivalent test
to help the compiler see that ts[0].tv_sec is used only if sedt.
This commit is contained in:
Paul Eggert
2026-05-11 15:37:37 -07:00
parent d96b58545d
commit 0efc3bd058

View File

@@ -455,7 +455,7 @@ set_stat (char const *file_name,
}
if (r == 0)
{
if (incremental_option)
if (ts[0].tv_nsec != UTIME_OMIT)
check_time (file_name, ts[0]);
check_time (file_name, ts[1]);
}