From 8a68c41c2e7e0a1d5128e7e30ab673a6699c2f45 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 27 Oct 2015 21:30:40 +0900 Subject: [PATCH] Fixup -Wshadow warnings Usually harmless, but some of them we can actually kill variables. Signed-off-by: Jens Axboe --- engines/mmap.c | 4 ++-- engines/mtd.c | 4 ++-- filesetup.c | 2 +- stat.c | 2 +- t/btrace2fio.c | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/engines/mmap.c b/engines/mmap.c index 69add78a..14e4013d 100644 --- a/engines/mmap.c +++ b/engines/mmap.c @@ -242,8 +242,8 @@ static int fio_mmapio_open_file(struct thread_data *td, struct fio_file *f) fmd = calloc(1, sizeof(*fmd)); if (!fmd) { - int fio_unused ret; - ret = generic_close_file(td, f); + int fio_unused __ret; + __ret = generic_close_file(td, f); return 1; } diff --git a/engines/mtd.c b/engines/mtd.c index db9c539e..9381089a 100644 --- a/engines/mtd.c +++ b/engines/mtd.c @@ -152,8 +152,8 @@ err_free: free(fmd); err_close: { - int fio_unused ret; - ret = generic_close_file(td, f); + int fio_unused __ret; + __ret = generic_close_file(td, f); return 1; } } diff --git a/filesetup.c b/filesetup.c index 634d556e..b5628ce6 100644 --- a/filesetup.c +++ b/filesetup.c @@ -917,7 +917,7 @@ int setup_files(struct thread_data *td) } td->ts.nr_block_infos = len; - for (int i = 0; i < len; i++) + for (i = 0; i < len; i++) td->ts.block_infos[i] = BLOCK_INFO(0, BLOCK_STATE_UNINIT); } else diff --git a/stat.c b/stat.c index 2a65fed8..091d6fb1 100644 --- a/stat.c +++ b/stat.c @@ -1173,7 +1173,7 @@ static struct json_object *show_thread_status_json(struct thread_stat *ts, if (len) { struct json_object *block, *percentile_object, *states; - int state, i; + int state; block = json_create_object(); json_object_add_value_object(root, "block", block); diff --git a/t/btrace2fio.c b/t/btrace2fio.c index d0b7e091..04b6abed 100644 --- a/t/btrace2fio.c +++ b/t/btrace2fio.c @@ -937,14 +937,14 @@ static int merge_entries(struct btrace_pid *pida, struct btrace_pid *pidb) return 1; } -static void check_merges(struct btrace_pid *p, struct flist_head *pid_list) +static void check_merges(struct btrace_pid *p, struct flist_head *pidlist) { struct flist_head *e, *tmp; if (p->ignore) return; - flist_for_each_safe(e, tmp, pid_list) { + flist_for_each_safe(e, tmp, pidlist) { struct btrace_pid *pidb; pidb = flist_entry(e, struct btrace_pid, pid_list); -- 2.25.1