Fixed many compilation warnings

This commit is contained in:
James Youngman
2005-12-23 18:24:20 +00:00
parent 5bf15c9583
commit 7046234c8b
14 changed files with 114 additions and 83 deletions
+9 -2
View File
@@ -827,8 +827,11 @@ safely_chdir_nofollow(const char *dest,
boolean *did_stat)
{
int extraflags, fd;
extraflags = 0;
(void) direction;
(void) statbuf_dest;
extraflags = 0;
*did_stat = false;
switch (symlink_follow_option)
@@ -1037,6 +1040,8 @@ static void do_process_top_dir(char *pathname,
int mode,
struct stat *pstat)
{
(void) pstat;
process_path (pathname, base, false, ".", mode);
complete_pending_execdirs(get_eval_tree());
}
@@ -1046,6 +1051,8 @@ static void do_process_predicate(char *pathname,
int mode,
struct stat *pstat)
{
(void) mode;
state.rel_pathname = base;
apply_predicate (pathname, pstat, get_eval_tree());
}
@@ -1264,7 +1271,7 @@ process_dir (char *pathname, char *name, int pathlen, struct stat *statp, char *
{
int subdirs_left; /* Number of unexamined subdirs in PATHNAME. */
boolean subdirs_unreliable; /* if true, cannot use dir link count as subdir limif (if false, it may STILL be unreliable) */
int idx; /* Which entry are we on? */
unsigned int idx; /* Which entry are we on? */
struct stat stat_buf;
struct savedir_dirinfo *dirinfo;
+2
View File
@@ -221,6 +221,8 @@ filesystem_type_uncached (const struct stat *statp, const char *path)
struct mount_entry *entries, *entry;
char *type;
(void) path;
#ifdef AFS
if (in_afs(path))
{
-1
View File
@@ -414,7 +414,6 @@ process_all_startpoints(int argc, char *argv[])
int
main (int argc, char **argv)
{
int i;
int end_of_leading_options = 0; /* First arg after any -H/-L etc. */
struct predicate *eval_tree;
+2
View File
@@ -135,7 +135,9 @@ static boolean parse_readable PARAMS((const struct parser_table*, char *arg
static boolean parse_regex PARAMS((const struct parser_table*, char *argv[], int *arg_ptr));
static boolean parse_regextype PARAMS((const struct parser_table*, char *argv[], int *arg_ptr));
static boolean parse_samefile PARAMS((const struct parser_table*, char *argv[], int *arg_ptr));
#if 0
static boolean parse_show_control_chars PARAMS((const struct parser_table*, char *argv[], int *arg_ptr));
#endif
static boolean parse_size PARAMS((const struct parser_table*, char *argv[], int *arg_ptr));
static boolean parse_true PARAMS((const struct parser_table*, char *argv[], int *arg_ptr));
static boolean parse_type PARAMS((const struct parser_table*, char *argv[], int *arg_ptr));
+13
View File
@@ -1263,18 +1263,30 @@ pred_perm (char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
boolean
pred_executable (char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
{
(void) pathname;
(void) stat_buf;
(void) pred_ptr;
return 0 == access(state.rel_pathname, X_OK);
}
boolean
pred_readable (char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
{
(void) pathname;
(void) stat_buf;
(void) pred_ptr;
return 0 == access(state.rel_pathname, R_OK);
}
boolean
pred_writable (char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
{
(void) pathname;
(void) stat_buf;
(void) pred_ptr;
return 0 == access(state.rel_pathname, W_OK);
}
@@ -1943,6 +1955,7 @@ pred_sanity_check(const struct predicate *predicates)
case ARG_PUNCTUATION:
case ARG_TEST:
case ARG_NOOP:
/* Punctuation and tests should have no side
* effects and not inhibit default print.
*/