Jim Meyering <jim <at> meyering.net> writes: > utimens.c: In function 'lutimens': > utimens.c:425: error: declaration of 'st' shadows a previous local [- Wshadow] > utimens.c:404: error: shadowed declaration is here [-Wshadow] > > This patch is nearly minimal, but perhaps not ideal.
Thanks for the report. And your assessment of being non-ideal is correct. > You might prefer to retain the name "st", > and simply declare each in its own scope, > but that'd be more invasive. I just spotted a larger logic problem - on Linux kernels between 2.6.19 and 2.6.22 (when utimensat existed, but rejected AT_SYMLINK_NOFOLLOW)(, we are now calling lstat twice when only once is necessary. Therefore, I think the best course of action is to reuse a single stat buffer, and guarantees at most one lstat per lutimens. I'll work up the patch. -- Eric Blake