From: Tomohiro Kusumi Date: Tue, 9 Jun 2015 23:28:13 +0000 (+0900) Subject: Fix compiler warning X-Git-Tag: fio-2.2.9~10 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=7a717ac6e6f154deebfe2af75a82ca0a76025453;hp=f491a907983c1022ec3c4d3a76d969c286fe441b 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 --- 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;