findutils/findutils-4.5.7-warnings.patch
2010-05-10 16:48:39 +00:00

59 lines
1.7 KiB
Diff

find/pred.c | 6 +++---
xargs/xargs.c | 5 +++--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/find/pred.c b/find/pred.c
index e310eea..6eeaa42 100644
--- a/find/pred.c
+++ b/find/pred.c
@@ -566,7 +566,7 @@ impl_pred_exec (const char *pathname,
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;
@@ -665,7 +665,7 @@ impl_pred_exec (const char *pathname,
if (target != pathname)
{
assert (local);
- free (target);
+ free ((char *) target);
}
return result;
}
@@ -2111,7 +2111,7 @@ launch (struct buildcmd_control *ctl, void *usercontext, int argc, char **argv)
}
}
- 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
index c53b5a9..a0d90a5 100644
--- a/xargs/xargs.c
+++ b/xargs/xargs.c
@@ -1105,7 +1105,7 @@ xargs_do_exec (struct buildcmd_control *ctl, void *usercontext, int argc, char *
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);
@@ -1123,7 +1123,8 @@ xargs_do_exec (struct buildcmd_control *ctl, void *usercontext, int argc, char *
* 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]);