[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
new shadowing warning in isapipe.c
From: |
Jim Meyering |
Subject: |
new shadowing warning in isapipe.c |
Date: |
Thu, 31 Aug 2006 00:10:50 +0200 |
Hi Paul,
How about this, so coreutils' "make distcheck" passes once again?
It avoids a warning from -Wshadow.
2006-08-30 Jim Meyering <address@hidden>
* isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid shadowing
the parameter.
Index: lib/isapipe.c
===================================================================
RCS file: /sources/gnulib/gnulib/lib/isapipe.c,v
retrieving revision 1.1
diff -u -r1.1 isapipe.c
--- lib/isapipe.c 29 Aug 2006 20:32:07 -0000 1.1
+++ lib/isapipe.c 30 Aug 2006 22:07:00 -0000
@@ -71,17 +71,17 @@
&& PIPE_LINK_COUNT_MAX != (nlink_t) -1)
&& (S_ISFIFO (st.st_mode) | S_ISSOCK (st.st_mode)))
{
- int fd[2];
- int pipe_result = pipe (fd);
+ int fd_pair[2];
+ int pipe_result = pipe (fd_pair);
if (pipe_result != 0)
return pipe_result;
else
{
struct stat pipe_st;
- int fstat_pipe_result = fstat (fd[0], &pipe_st);
+ int fstat_pipe_result = fstat (fd_pair[0], &pipe_st);
int fstat_pipe_errno = errno;
- close (fd[0]);
- close (fd[1]);
+ close (fd_pair[0]);
+ close (fd_pair[1]);
if (fstat_pipe_result != 0)
{
errno = fstat_pipe_errno;
- new shadowing warning in isapipe.c,
Jim Meyering <=