From 7a717ac6e6f154deebfe2af75a82ca0a76025453 Mon Sep 17 00:00:00 2001 From: Tomohiro Kusumi Date: Wed, 10 Jun 2015 08:28:13 +0900 Subject: [PATCH] Fix compiler warning The local variable off is uninitialized on 'goto fill'. Initializing with 0 seems to be appropriate to fix following gcc warning although off is actually always initialized as the function returns with 1 on 'if (!i)' case. options.c:920: warning: 'off' may be used uninitialized in this function --- options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/options.c b/options.c index e3b93383..76146a71 100644 --- a/options.c +++ b/options.c @@ -917,7 +917,7 @@ static int str_opendir_cb(void *data, const char fio_unused *str) static int pattern_cb(char *pattern, unsigned int max_size, const char *input, unsigned int *pattern_bytes) { - long off; + long off = 0; int i = 0, j = 0, len, k, base = 10; uint32_t pattern_length; char *loc1, *loc2; -- 2.25.1