This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix warning in Linux openat implementation when__ASSUME_ATFCTS is set.


Another piece of low hanging warning fruit, committed to master.

	* sysdeps/unix/sysv/linux/openat.c (OPENAT_NOT_CANCEL): Declare syscall
	'err' in the ifdef scope in which it is actually used.
---
 ChangeLog                        |    3 +++
 sysdeps/unix/sysv/linux/openat.c |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index dc93fce..906df52 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2012-03-13  David S. Miller  <davem@davemloft.net>
 
+	* sysdeps/unix/sysv/linux/openat.c (OPENAT_NOT_CANCEL): Declare syscall
+	'err' in the ifdef scope in which it is actually used.
+
 	* nss/nss_db/db-init.c: Include string.h
 
 2012-03-12  David S. Miller  <davem@davemloft.net>
diff --git a/sysdeps/unix/sysv/linux/openat.c b/sysdeps/unix/sysv/linux/openat.c
index 11e673f..62ea1e3 100644
--- a/sysdeps/unix/sysv/linux/openat.c
+++ b/sysdeps/unix/sysv/linux/openat.c
@@ -84,7 +84,6 @@ OPENAT_NOT_CANCEL (fd, file, oflag, mode)
   oflag |= MORE_OFLAGS;
 #endif
 
-  INTERNAL_SYSCALL_DECL (err);
   int res;
 
 #ifdef __NR_openat
@@ -104,6 +103,7 @@ OPENAT_NOT_CANCEL (fd, file, oflag, mode)
 #endif
 
 #ifndef __ASSUME_ATFCTS
+  INTERNAL_SYSCALL_DECL (err);
   char *buf = NULL;
 
   if (fd != AT_FDCWD && file[0] != '/')
-- 
1.7.6.401.g6a319


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]