From: George Lu Date: Sat, 2 Jun 2018 01:02:56 +0000 (-0700) Subject: -O# with no file fails X-Git-Tag: v1.3.5~3^2~33^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e586aa0253fd2b0096cf1c3e3f3457540339bfe;p=thirdparty%2Fzstd.git -O# with no file fails --- diff --git a/tests/paramgrill.c b/tests/paramgrill.c index ab1c45d5d..580e84abd 100644 --- a/tests/paramgrill.c +++ b/tests/paramgrill.c @@ -889,6 +889,7 @@ int optimizeForSize(const char* inFileName, U32 targetSpeed) /* end summary */ BMK_printWinner(stdout, 99, winner.result, winner.params, benchedSize); + BMK_translateAdvancedParams(winner.params); DISPLAY("grillParams size - optimizer completed \n"); /* clean up*/ @@ -1005,7 +1006,6 @@ int main(int argc, const char** argv) DISPLAY("invalid --zstd= format\n"); return 1; /* check the end of string */ } - break; //if not return, success } else if (argument[0]=='-') { argument++; @@ -1114,7 +1114,12 @@ int main(int argc, const char** argv) } if (filenamesStart==0) { - result = benchSample(); + if (optimizer) { + DISPLAY("Optimizer Expects File") + return 1; + } else { + result = benchSample(); + } } else { if (optimizer) { result = optimizeForSize(input_filename, targetSpeed);