From: Sitsofe Wheeer Date: Sun, 27 Nov 2016 07:53:29 +0000 (+0000) Subject: Silence compiler warnings X-Git-Tag: fio-2.16~16 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=fc8d6d050a22662f445954303953d81e500496aa Silence compiler warnings - Mark __parse_jobs_ini and fmt_desc[] as static as they aren't used outside their modules. - Cast the shifted trim state enum to an unsigned int to silence spurious Wshift-sign-overflow warning. Signed-off-by: Sitsofe Wheeer --- diff --git a/init.c b/init.c index d8c0bd17..382fa1ff 100644 --- a/init.c +++ b/init.c @@ -1679,7 +1679,7 @@ static int is_empty_or_comment(char *line) /* * This is our [ini] type file parser. */ -int __parse_jobs_ini(struct thread_data *td, +static int __parse_jobs_ini(struct thread_data *td, char *file, int is_buf, int stonewall_flag, int type, int nested, char *name, char ***popts, int *aopts, int *nopts) { diff --git a/options.c b/options.c index 5937eb67..dfecd9d8 100644 --- a/options.c +++ b/options.c @@ -22,7 +22,7 @@ char client_sockaddr_str[INET6_ADDRSTRLEN] = { 0 }; #define cb_data_to_td(data) container_of(data, struct thread_data, o) -struct pattern_fmt_desc fmt_desc[] = { +static struct pattern_fmt_desc fmt_desc[] = { { .fmt = "%o", .len = FIELD_SIZE(struct io_u *, offset), diff --git a/stat.h b/stat.h index de5c12a5..7a25415a 100644 --- a/stat.h +++ b/stat.h @@ -123,7 +123,7 @@ struct group_run_stats { #define BLOCK_INFO_STATE(block_info) \ ((block_info) >> BLOCK_INFO_STATE_SHIFT) #define BLOCK_INFO(state, trim_cycles) \ - ((trim_cycles) | ((state) << BLOCK_INFO_STATE_SHIFT)) + ((trim_cycles) | ((unsigned int) (state) << BLOCK_INFO_STATE_SHIFT)) #define BLOCK_INFO_SET_STATE(block_info, state) \ BLOCK_INFO(state, BLOCK_INFO_TRIMS(block_info)) enum block_info_state {