From: Anand Jain Date: Sun, 29 Jan 2023 02:42:30 +0000 (+0800) Subject: fstests: doio.c, fix missing initialization of -C arg X-Git-Tag: v2023.02.05~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7fa8a9a25bd1415c67e7bf0ed6c02727ba94fc40;p=xfstests-dev.git fstests: doio.c, fix missing initialization of -C arg Resolves GCC warnings on null values for %tok. doio.c: In function 'parse_cmdline': doio.c:3113:33: warning: '%s' directive argument is null [-Wformat-overflow=] 3113 | fprintf(stderr, | ^~~~~~~~~~~~~~~ 3114 | "%s: Illegal -C arg (%s). Must be one of: ", | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3115 | Prog, tok); | ~~~~~~~~~~ Signed-off-by: Anand Jain Reviewed-by: Bill O'Donnell Signed-off-by: Zorro Lang --- diff --git a/ltp/doio.c b/ltp/doio.c index 83f8cf55..fd64df0f 100644 --- a/ltp/doio.c +++ b/ltp/doio.c @@ -3106,6 +3106,7 @@ char *opts; case 'C': C_opt++; + tok = strtok(optarg, ","); for(s=checkmap; s->string != NULL; s++) if(!strcmp(s->string, optarg)) break;