Skip to content

Commit

Permalink
Replace ARGSUSED with proper warnings
Browse files Browse the repository at this point in the history
Passes (except for one zstd line) Linux on clang 13 and GCC 10.2.1-6
and FreeBSD 13 (clang 11) with
-Wall -Wextra -Wno-sign-compare -Wno-missing-field-initializers -Werror

Module sources with ARGSUSED also grew a -Werror=unused-parameter

Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#12167
  • Loading branch information
nabijaczleweli committed Jun 6, 2021
1 parent 0bf2d24 commit 3cf54c9
Show file tree
Hide file tree
Showing 218 changed files with 1,779 additions and 952 deletions.
6 changes: 4 additions & 2 deletions cmd/raidz_test/raidz_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,13 @@ static void print_opts(raidz_test_opts_t *opts, boolean_t force)
{
char *verbose;
switch (opts->rto_v) {
case 0:
case D_ALL:
verbose = "no";
break;
case 1:
case D_INFO:
verbose = "info";
break;
case D_DEBUG:
default:
verbose = "debug";
break;
Expand Down Expand Up @@ -266,6 +267,7 @@ cmp_data(raidz_test_opts_t *opts, raidz_map_t *rm)
static int
init_rand(void *data, size_t size, void *private)
{
(void) private;
int i;
int *dst = (int *)data;

Expand Down
4 changes: 2 additions & 2 deletions cmd/raidz_test/raidz_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ static inline size_t ilog2(size_t a)

#define LOG(lvl, a...) \
{ \
if (rto_opts.rto_v >= lvl) \
if ((rto_opts.rto_v + 1) >= (lvl + 1)) \
(void) fprintf(stdout, a); \
} \

#define LOG_OPT(lvl, opt, a...) \
{ \
if (opt->rto_v >= lvl) \
if ((opt->rto_v + 1) >= (lvl + 1)) \
(void) fprintf(stdout, a); \
} \

Expand Down
Loading

0 comments on commit 3cf54c9

Please sign in to comment.