]> granicus.if.org Git - llvm/commitdiff
Use "%zd" format specifier for printing number of testcases executed.
authorKostya Serebryany <kcc@google.com>
Tue, 14 Feb 2017 22:14:36 +0000 (22:14 +0000)
committerKostya Serebryany <kcc@google.com>
Tue, 14 Feb 2017 22:14:36 +0000 (22:14 +0000)
Summary:
This helps to avoid signed integer overflow after running a fast fuzz target for several hours, e.g.:

<...>
Done -1097903291 runs in 54001 second(s)

Reviewers: kcc

Reviewed By: kcc

Differential Revision: https://reviews.llvm.org/D29941

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295112 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Fuzzer/FuzzerDriver.cpp

index 01f2bc0413e3177f32b257b9f92cf9e17196d029..8bbafd3a43a1e8f3ed3d21234aadc86256e5eb67 100644 (file)
@@ -567,7 +567,7 @@ int FuzzerDriver(int *argc, char ***argv, UserCallback Callback) {
   F->Loop();
 
   if (Flags.verbosity)
-    Printf("Done %d runs in %zd second(s)\n", F->getTotalNumberOfRuns(),
+    Printf("Done %zd runs in %zd second(s)\n", F->getTotalNumberOfRuns(),
            F->secondsSinceProcessStartUp());
   F->PrintFinalStats();