[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: utimens on older linux
From: |
Eric Blake |
Subject: |
Re: utimens on older linux |
Date: |
Mon, 14 Dec 2009 22:11:07 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Eric Blake on 11/25/2009 6:41 AM:
> As discussed on coreutils; some Linux kernels support utimensat but not
> symlink timestamps. Now pushed.
This still has the potential for declaring an unused variable. Fixed as
follows:
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAksnGmsACgkQ84KuGfSFAYBOugCguU95fpzsELXKRibIBJHyr9hT
SdUAn2+KNsw8e7U2rJYzdAQSlRSHz1dE
=XDil
-----END PGP SIGNATURE-----
>From 2c75050732756a378309e8490e79e9eb81e3c9d5 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Mon, 14 Dec 2009 22:07:15 -0700
Subject: [PATCH] utimens: one more try at avoiding compiler warning
* lib/utimens.c (lutimens): Lower scope of result.
Signed-off-by: Eric Blake <address@hidden>
---
ChangeLog | 5 +++++
lib/utimens.c | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3e5a352..b5ca5eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-14 Eric Blake <address@hidden>
+
+ utimens: one more try at avoiding compiler warning
+ * lib/utimens.c (lutimens): Lower scope of result.
+
2009-12-13 Bruno Haible <address@hidden>
Move the malloc checking from module 'list' to new module 'xlist'.
diff --git a/lib/utimens.c b/lib/utimens.c
index 5603600..d8e2f32 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;
--
1.6.5.rc1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: utimens on older linux,
Eric Blake <=