diff --git a/find/find.c b/find/find.c index fbe09e2f..da186b4c 100644 --- a/find/find.c +++ b/find/find.c @@ -1854,7 +1854,6 @@ process_dir (char *pathname, char *name, int pathlen, struct stat *statp, char * { enum SafeChdirStatus status; struct dir_id did; - boolean changed = false; /* We could go back and do the next command-line arg instead, maybe using longjmp. */ diff --git a/find/pred.c b/find/pred.c index 60fe86b5..5ba6eb30 100644 --- a/find/pred.c +++ b/find/pred.c @@ -449,6 +449,8 @@ new_impl_pred_exec (const char *pathname, struct stat *stat_buf, { struct exec_val *execp = &pred_ptr->args.exec_vec; size_t len = strlen(pathname); + + (void) stat_buf; if (execp->multiple) { @@ -1272,6 +1274,8 @@ pred_samefile (char *pathname, struct stat *stat_buf, struct predicate *pred_ptr * predicate cannot return true. Hence there would be no need to * stat the file we're lookingn at. */ + (void) pathname; + return stat_buf->st_ino == pred_ptr->args.fileid.ino && stat_buf->st_dev == pred_ptr->args.fileid.dev; } diff --git a/locate/locate.c b/locate/locate.c index 938bc90d..ee8d9be3 100644 --- a/locate/locate.c +++ b/locate/locate.c @@ -438,7 +438,8 @@ static int visit_regex(const char *munged_filename, const char *original_filename, void *context) { struct regular_expression *p = context; - + (void) original_filename; + if (0 == regexec(&p->re, munged_filename, 0u, NULL, 0)) return VISIT_CONTINUE; /* match */ else @@ -453,7 +454,8 @@ visit_stats(const char *munged_filename, const char *original_filename, void *co size_t len = strlen(original_filename); const char *s; int highbit, whitespace, newline; - + (void) munged_filename; + ++(p->total_filename_count); p->total_filename_length += len;