Mercurial > hg > octave-kai > gnulib-hg
changeset 12447:b79168ca6a08
utimens: one more try at avoiding compiler warning
* lib/utimens.c (lutimens): Lower scope of result.
Signed-off-by: Eric Blake <ebb9@byu.net>
author | Eric Blake <ebb9@byu.net> |
---|---|
date | Mon, 14 Dec 2009 22:07:15 -0700 |
parents | 7e43ee94abd0 |
children | e962488c88ab |
files | ChangeLog lib/utimens.c |
diffstat | 2 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-12-14 Eric Blake <ebb9@byu.net> + + utimens: one more try at avoiding compiler warning + * lib/utimens.c (lutimens): Lower scope of result. + 2009-12-13 Bruno Haible <bruno@clisp.org> Move the malloc checking from module 'list' to new module 'xlist'.
--- a/lib/utimens.c +++ b/lib/utimens.c @@ -368,7 +368,6 @@ struct timespec *ts = timespec ? adjusted_timespec : NULL; int adjustment_needed = 0; struct stat st; - int result; if (ts) { @@ -387,7 +386,7 @@ #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 @@ { struct timeval timeval[2]; struct timeval const *t; + int result; if (ts) { timeval[0].tv_sec = ts[0].tv_sec;