2011-05-11 14:52:18 +00:00
|
|
|
From 1b7065f25457fea9f9ee7100437b12815b92a38c Mon Sep 17 00:00:00 2001
|
|
|
|
From: Kamil Dudka <kdudka@redhat.com>
|
|
|
|
Date: Wed, 11 May 2011 16:46:57 +0200
|
|
|
|
Subject: [PATCH 4/4] findutils-4.5.7-warnings.patch
|
|
|
|
|
|
|
|
---
|
2010-05-10 16:48:39 +00:00
|
|
|
find/pred.c | 6 +++---
|
2010-04-03 15:50:55 +00:00
|
|
|
xargs/xargs.c | 5 +++--
|
2010-05-10 16:48:39 +00:00
|
|
|
2 files changed, 6 insertions(+), 5 deletions(-)
|
2010-04-03 15:50:55 +00:00
|
|
|
|
|
|
|
diff --git a/find/pred.c b/find/pred.c
|
2011-05-11 14:52:18 +00:00
|
|
|
index 3acfe9f..ee3c245 100644
|
2010-04-03 15:50:55 +00:00
|
|
|
--- a/find/pred.c
|
|
|
|
+++ b/find/pred.c
|
2011-05-11 14:52:18 +00:00
|
|
|
@@ -561,7 +561,7 @@ impl_pred_exec (const char *pathname,
|
2010-05-10 16:48:39 +00:00
|
|
|
struct predicate *pred_ptr)
|
|
|
|
{
|
|
|
|
struct exec_val *execp = &pred_ptr->args.exec_vec;
|
|
|
|
- char *target;
|
|
|
|
+ const char *target;
|
|
|
|
bool result;
|
|
|
|
const bool local = is_exec_in_local_dir (pred_ptr->pred_func);
|
|
|
|
char *prefix;
|
2011-05-11 14:52:18 +00:00
|
|
|
@@ -660,7 +660,7 @@ impl_pred_exec (const char *pathname,
|
2010-05-10 16:48:39 +00:00
|
|
|
if (target != pathname)
|
|
|
|
{
|
|
|
|
assert (local);
|
|
|
|
- free (target);
|
|
|
|
+ free ((char *) target);
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
2011-05-11 14:52:18 +00:00
|
|
|
@@ -2106,7 +2106,7 @@ launch (struct buildcmd_control *ctl, void *usercontext, int argc, char **argv)
|
2010-04-03 15:50:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- if (bc_args_exceed_testing_limit (argv))
|
|
|
|
+ if (bc_args_exceed_testing_limit ((const char **) argv))
|
|
|
|
errno = E2BIG;
|
|
|
|
else
|
|
|
|
execvp (argv[0], argv);
|
|
|
|
diff --git a/xargs/xargs.c b/xargs/xargs.c
|
2011-05-11 14:52:18 +00:00
|
|
|
index 3cc1832..35f6822 100644
|
2010-04-03 15:50:55 +00:00
|
|
|
--- a/xargs/xargs.c
|
|
|
|
+++ b/xargs/xargs.c
|
2011-05-11 14:52:18 +00:00
|
|
|
@@ -1132,7 +1132,7 @@ xargs_do_exec (struct buildcmd_control *ctl, void *usercontext, int argc, char *
|
2010-04-03 15:50:55 +00:00
|
|
|
|
|
|
|
prep_child_for_exec ();
|
|
|
|
|
|
|
|
- if (bc_args_exceed_testing_limit (argv))
|
|
|
|
+ if (bc_args_exceed_testing_limit ((const char **) argv))
|
|
|
|
errno = E2BIG;
|
|
|
|
else
|
|
|
|
execvp (argv[0], argv);
|
2011-05-11 14:52:18 +00:00
|
|
|
@@ -1150,7 +1150,8 @@ xargs_do_exec (struct buildcmd_control *ctl, void *usercontext, int argc, char *
|
2010-04-03 15:50:55 +00:00
|
|
|
* utility if we run it, for POSIX compliance on the
|
|
|
|
* handling of exit values.
|
|
|
|
*/
|
|
|
|
- write (fd[1], &errno, sizeof (int));
|
|
|
|
+ int sink = write (fd[1], &errno, sizeof (int));
|
|
|
|
+ (void) sink;
|
|
|
|
}
|
|
|
|
|
|
|
|
close (fd[1]);
|
2011-05-11 14:52:18 +00:00
|
|
|
--
|
|
|
|
1.7.4.4
|
|
|
|
|