mirror of https://github.com/thesofproject/sof.git
Tools: Testbench: Avoid warning about fallthrough and fix return code
The build of testbench fails at /* fallthrough */ with xt-clang build for MTL since warnings are treated in tesbench build as errors. The re-arrange of default and 'h' fixes also return of -EINVAL in default case for unknown option. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
parent
2006297ee2
commit
3f2096c6b9
|
@ -353,13 +353,14 @@ static int parse_input_args(int argc, char **argv, struct testbench_prm *tp)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* print usage */
|
/* print usage */
|
||||||
default:
|
|
||||||
fprintf(stderr, "unknown option %c\n", option);
|
|
||||||
ret = -EINVAL;
|
|
||||||
/* fallthrough */
|
|
||||||
case 'h':
|
case 'h':
|
||||||
print_usage(argv[0]);
|
print_usage(argv[0]);
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
|
|
||||||
|
default:
|
||||||
|
fprintf(stderr, "unknown option %c\n", option);
|
||||||
|
print_usage(argv[0]);
|
||||||
|
ret = -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
|
Loading…
Reference in New Issue