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 <anand.jain@xxxxxxxxxx> --- ltp/doio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ltp/doio.c b/ltp/doio.c index 83f8cf556325..fd64df0f674e 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; -- 2.38.1