*: add -Wunused-parameter; fix resulting breakage
[oweals/busybox.git] / findutils / grep.c
index c2a6a2187df93e3848c909dbc624d6a3bdfa38c7..c4cfcb8527abbf14e597deaddb990fcc7d92a1cb 100644 (file)
@@ -229,7 +229,7 @@ static int grep_file(FILE *file)
                                /* if we're just printing filenames, we stop after the first match */
                                if (PRINT_FILES_WITH_MATCHES) {
                                        puts(cur_file);
-                                       /* fall thru to "return 1" */
+                                       /* fall through to "return 1" */
                                }
                                /* OPT_L aka PRINT_FILES_WITHOUT_MATCHES: return early */
                                return 1; /* one match */
@@ -371,12 +371,12 @@ static void load_regexes_from_file(llist_t *fopt)
        }
 }
 
-static int file_action_grep(const char *filename, struct stat *statbuf, void* matched, int depth)
+static int file_action_grep(const char *filename, struct stat *statbuf ATTRIBUTE_UNUSED, void* matched, int depth ATTRIBUTE_UNUSED)
 {
        FILE *file = fopen(filename, "r");
        if (file == NULL) {
                if (!SUPPRESS_ERR_MSGS)
-                       bb_simple_perror_msg(cur_file);
+                       bb_simple_perror_msg(filename);
                open_errors = 1;
                return 0;
        }