silence some clang warnings

This commit is contained in:
Dominik Maier
2020-04-16 19:15:14 +02:00
parent 6940e13629
commit 69bd7c16eb
4 changed files with 11 additions and 1 deletions

View File

@ -847,7 +847,7 @@ int main(int argc, char **argv, char **envp) {
if (mem_limit_given) FATAL("Multiple -m options not supported"); if (mem_limit_given) FATAL("Multiple -m options not supported");
mem_limit_given = 1; mem_limit_given = 1;
if (!optarg) { FATAL("Bad syntax used for -m"); } if (!optarg) { FATAL("Wrong usage of -m"); }
if (!strcmp(optarg, "none")) { if (!strcmp(optarg, "none")) {

View File

@ -420,6 +420,8 @@ int main(int argc, char **argv_orig, char **envp) {
if (mem_limit_given) FATAL("Multiple -m options not supported"); if (mem_limit_given) FATAL("Multiple -m options not supported");
mem_limit_given = 1; mem_limit_given = 1;
if (!optarg) FATAL("Wrong usage of -m");
if (!strcmp(optarg, "none")) { if (!strcmp(optarg, "none")) {
afl->fsrv.mem_limit = 0; afl->fsrv.mem_limit = 0;

View File

@ -569,6 +569,8 @@ int main(int argc, char **argv_orig, char **envp) {
if (mem_limit_given) FATAL("Multiple -m options not supported"); if (mem_limit_given) FATAL("Multiple -m options not supported");
mem_limit_given = 1; mem_limit_given = 1;
if (!optarg) FATAL("Wrong usage of -m");
if (!strcmp(optarg, "none")) { if (!strcmp(optarg, "none")) {
fsrv->mem_limit = 0; fsrv->mem_limit = 0;
@ -612,6 +614,8 @@ int main(int argc, char **argv_orig, char **envp) {
if (timeout_given) FATAL("Multiple -t options not supported"); if (timeout_given) FATAL("Multiple -t options not supported");
timeout_given = 1; timeout_given = 1;
if (!optarg) FATAL("Wrong usage of -t");
if (strcmp(optarg, "none")) { if (strcmp(optarg, "none")) {
fsrv->exec_tmout = atoi(optarg); fsrv->exec_tmout = atoi(optarg);

View File

@ -811,6 +811,8 @@ int main(int argc, char **argv_orig, char **envp) {
if (mem_limit_given) FATAL("Multiple -m options not supported"); if (mem_limit_given) FATAL("Multiple -m options not supported");
mem_limit_given = 1; mem_limit_given = 1;
if (!optarg) FATAL("Wrong usage of -m");
if (!strcmp(optarg, "none")) { if (!strcmp(optarg, "none")) {
fsrv->mem_limit = 0; fsrv->mem_limit = 0;
@ -847,6 +849,8 @@ int main(int argc, char **argv_orig, char **envp) {
if (timeout_given) FATAL("Multiple -t options not supported"); if (timeout_given) FATAL("Multiple -t options not supported");
timeout_given = 1; timeout_given = 1;
if (!optarg) FATAL("Wrong usage of -t");
fsrv->exec_tmout = atoi(optarg); fsrv->exec_tmout = atoi(optarg);
if (fsrv->exec_tmout < 10 || optarg[0] == '-') if (fsrv->exec_tmout < 10 || optarg[0] == '-')