From: Eric Blake Date: Tue, 15 Dec 2009 05:07:15 +0000 (-0700) Subject: utimens: one more try at avoiding compiler warning X-Git-Tag: v0.1~5040 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=2c75050732756a378309e8490e79e9eb81e3c9d5;hp=bc835ff38e3fb6a3d0f5ed6eed0981dde8884124;p=gnulib.git utimens: one more try at avoiding compiler warning * lib/utimens.c (lutimens): Lower scope of result. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index 3e5a352a2..b5ca5eb47 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-12-14 Eric Blake + + utimens: one more try at avoiding compiler warning + * lib/utimens.c (lutimens): Lower scope of result. + 2009-12-13 Bruno Haible Move the malloc checking from module 'list' to new module 'xlist'. diff --git a/lib/utimens.c b/lib/utimens.c index 5603600bf..d8e2f32f9 100644 --- a/lib/utimens.c +++ b/lib/utimens.c @@ -368,7 +368,6 @@ lutimens (char const *file, struct timespec const timespec[2]) struct timespec *ts = timespec ? adjusted_timespec : NULL; int adjustment_needed = 0; struct stat st; - int result; if (ts) { @@ -387,7 +386,7 @@ lutimens (char const *file, struct timespec const timespec[2]) #if HAVE_UTIMENSAT if (0 <= lutimensat_works_really) { - result = utimensat (AT_FDCWD, file, ts, AT_SYMLINK_NOFOLLOW); + int result = utimensat (AT_FDCWD, file, ts, AT_SYMLINK_NOFOLLOW); # ifdef __linux__ /* Work around a kernel bug: http://bugzilla.redhat.com/442352 @@ -427,6 +426,7 @@ lutimens (char const *file, struct timespec const timespec[2]) { struct timeval timeval[2]; struct timeval const *t; + int result; if (ts) { timeval[0].tv_sec = ts[0].tv_sec;