Blame SOURCES/findutils-4.5.7-warnings.patch

709426
From 1b7065f25457fea9f9ee7100437b12815b92a38c Mon Sep 17 00:00:00 2001
709426
From: Kamil Dudka <kdudka@redhat.com>
709426
Date: Wed, 11 May 2011 16:46:57 +0200
709426
Subject: [PATCH 4/4] findutils-4.5.7-warnings.patch
709426
709426
---
709426
 find/Makefile.am  |    2 +-
709426
 find/defs.h       |    2 +-
709426
 find/exec.c       |    2 +-
709426
 find/find.c       |   14 +-------------
709426
 find/pred.c       |    2 +-
709426
 lib/Makefile.am   |    2 +-
709426
 xargs/Makefile.am |    2 +-
709426
 xargs/xargs.c     |    5 +++--
709426
 8 files changed, 10 insertions(+), 21 deletions(-)
709426
709426
diff --git a/find/Makefile.am b/find/Makefile.am
709426
index 0795b87..f1068bf 100644
709426
--- a/find/Makefile.am
709426
+++ b/find/Makefile.am
709426
@@ -36,7 +36,7 @@ endif
709426
 # We don't just include man_MANS in EXTRA_DIST because while the value of
709426
 # man_MANS is not always the same, we want to distribute all of those files.
709426
 EXTRA_DIST = defs.h sharefile.h print.h find.1 ftsfind.1 oldfind.1
709426
-INCLUDES = -I../gl/lib -I$(top_srcdir)/lib -I$(top_srcdir)/gl/lib -I../intl -DLOCALEDIR=\"$(localedir)\"
709426
+AM_CPPFLAGS = -I../gl/lib -I$(top_srcdir)/lib -I$(top_srcdir)/gl/lib -I../intl -DLOCALEDIR=\"$(localedir)\"
709426
 LDADD = ./libfindtools.a ../lib/libfind.a ../gl/lib/libgnulib.a $(LIBINTL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIB_SELINUX) $(LIB_CLOSE) $(MODF_LIBM) $(FINDLIBS) $(GETHOSTNAME_LIB) $(LIB_EACCESS)
709426
 # gnulib advises we link against <first> because we use <second>:
709426
 # $(GETHOSTNAME_LIB)            uname
709426
diff --git a/find/defs.h b/find/defs.h
709426
index 366edab..f25b700 100644
709426
--- a/find/defs.h
709426
+++ b/find/defs.h
709426
@@ -258,7 +258,7 @@ struct predicate
709426
 
709426
   /* Only used for debugging, but defined unconditionally so individual
709426
      modules can be compiled with -DDEBUG.  */
709426
-  char *p_name;
709426
+  const char *p_name;
709426
 
709426
   /* The type of this node.  There are two kinds.  The first is real
709426
      predicates ("primaries") such as -perm, -print, or -exec.  The
709426
diff --git a/find/exec.c b/find/exec.c
709426
index aa69fe3..f731d82 100644
709426
--- a/find/exec.c
709426
+++ b/find/exec.c
709426
@@ -324,7 +324,7 @@ launch (struct buildcmd_control *ctl, void *usercontext, int argc, char **argv)
709426
 	    }
709426
 	}
709426
 
709426
-      if (bc_args_exceed_testing_limit (argv))
709426
+      if (bc_args_exceed_testing_limit ((const char **) argv))
709426
 	errno = E2BIG;
709426
       else
709426
 	execvp (argv[0], argv);
709426
diff --git a/find/find.c b/find/find.c
709426
index 5d287b5..00a2a6c 100644
709426
--- a/find/find.c
709426
+++ b/find/find.c
709426
@@ -528,6 +528,7 @@ wd_sanity_check (const char *thing_to_stat,
709426
 #ifdef STAT_MOUNTPOINTS
709426
 	  isfatal = dirchange_is_fatal (specific_what,isfatal,silent,newinfo);
709426
 #else
709426
+      (void) silent;
709426
 	  isfatal = RETRY_IF_SANITY_CHECK_FAILS;
709426
 #endif
709426
 	}
709426
@@ -1302,7 +1303,6 @@ process_dir (char *pathname, char *name, int pathlen, const struct stat *statp,
709426
 {
709426
   int subdirs_left;		/* Number of unexamined subdirs in PATHNAME. */
709426
   bool subdirs_unreliable;	/* if true, cannot use dir link count as subdir limif (if false, it may STILL be unreliable) */
709426
-  unsigned int idx;		/* Which entry are we on? */
709426
   struct stat stat_buf;
709426
   size_t dircount = 0u;
709426
   DIR *dirp;
709426
@@ -1519,7 +1519,6 @@ process_dir (char *pathname, char *name, int pathlen, const struct stat *statp,
709426
       if (strcmp (name, "."))
709426
 	{
709426
 	  enum SafeChdirStatus status;
709426
-	  struct dir_id did;
709426
 
709426
 	  /* We could go back and do the next command-line arg
709426
 	     instead, maybe using longjmp.  */
709426
@@ -1555,17 +1554,6 @@ process_dir (char *pathname, char *name, int pathlen, const struct stat *statp,
709426
 		     "%s", safely_quote_err_filename (0, pathname));
709426
 	      return;
709426
 	    }
709426
-
709426
-	  if (dir_curr > 0)
709426
-	    {
709426
-	      did.dev = dir_ids[dir_curr-1].dev;
709426
-	      did.ino = dir_ids[dir_curr-1].ino;
709426
-	    }
709426
-	  else
709426
-	    {
709426
-	      did.dev = starting_stat_buf.st_dev;
709426
-	      did.ino = starting_stat_buf.st_ino;
709426
-	    }
709426
 	}
709426
 
709426
       free (cur_path);
709426
diff --git a/find/pred.c b/find/pred.c
709426
index 88dacd9..e9c9a49 100644
709426
--- a/find/pred.c
709426
+++ b/find/pred.c
709426
@@ -1216,7 +1216,7 @@ pred_context (const char *pathname, struct stat *stat_buf,
709426
    Return BUF. */
709426
 
709426
 static char *
709426
-blank_rtrim (char *str, char *buf)
709426
+blank_rtrim (const char *str, char *buf)
709426
 {
709426
   int i;
709426
 
709426
diff --git a/lib/Makefile.am b/lib/Makefile.am
709426
index bbb4dc2..eba43d2 100644
709426
--- a/lib/Makefile.am
709426
+++ b/lib/Makefile.am
709426
@@ -28,7 +28,7 @@ DISTCLEANFILES =
709426
 MAINTAINERCLEANFILES =
709426
 
709426
 
709426
-INCLUDES = -I../gl/lib -I$(top_srcdir)/gl/lib
709426
+AM_CPPFLAGS = -I../gl/lib -I$(top_srcdir)/gl/lib
709426
 LDADD = ../gl/lib/libgnulib.a $(LIBINTL)
709426
 
709426
 libfind_a_SOURCES += printquoted.h listfile.h \
709426
diff --git a/xargs/Makefile.am b/xargs/Makefile.am
709426
index d34f87a..1cfe3e4 100644
709426
--- a/xargs/Makefile.am
709426
+++ b/xargs/Makefile.am
709426
@@ -3,7 +3,7 @@ AM_CFLAGS = $(WARN_CFLAGS)
709426
 localedir = $(datadir)/locale
709426
 bin_PROGRAMS = xargs
709426
 man_MANS = xargs.1
709426
-INCLUDES = -I.. -I../gl/lib -I$(top_srcdir)/gl/lib -I$(top_srcdir)/lib -I../intl -DLOCALEDIR=\"$(localedir)\"
709426
+AM_CPPFLAGS = -I.. -I../gl/lib -I$(top_srcdir)/gl/lib -I$(top_srcdir)/lib -I../intl -DLOCALEDIR=\"$(localedir)\"
709426
 LDADD = ../lib/libfind.a ../gl/lib/libgnulib.a $(LIB_CLOSE) $(LIBINTL)
709426
 EXTRA_DIST = $(man_MANS)
709426
 SUBDIRS = . testsuite
709426
diff --git a/xargs/xargs.c b/xargs/xargs.c
709426
index 3cc1832..35f6822 100644
709426
--- a/xargs/xargs.c
709426
+++ b/xargs/xargs.c
709426
@@ -1208,7 +1208,7 @@ xargs_do_exec (struct buildcmd_control *ctl, void *usercontext, int argc, char *
709426
 
709426
 	    prep_child_for_exec ();
709426
 
709426
-	    if (bc_args_exceed_testing_limit (argv))
709426
+	    if (bc_args_exceed_testing_limit ((const char **) argv))
709426
 	      errno = E2BIG;
709426
 	    else
709426
 	      execvp (argv[0], argv);
709426
@@ -1226,7 +1226,8 @@ xargs_do_exec (struct buildcmd_control *ctl, void *usercontext, int argc, char *
709426
 		 * utility if we run it, for POSIX compliance on the
709426
 		 * handling of exit values.
709426
 		 */
709426
-		write (fd[1], &errno, sizeof (int));
709426
+		int sink = write (fd[1], &errno, sizeof (int));
709426
+		(void) sink;
709426
 	      }
709426
 
709426
 	    close (fd[1]);
709426
-- 
709426
1.7.4.4
709426