]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
[pzstd] Print the correct width ints
authorNick Terrell <terrelln@fb.com>
Fri, 7 Oct 2016 04:31:16 +0000 (21:31 -0700)
committerNick Terrell <terrelln@fb.com>
Fri, 14 Oct 2016 22:26:55 +0000 (15:26 -0700)
contrib/pzstd/Pzstd.cpp

index 59a2496c43120dc1ce2cb405876f66071dd6d497..68f5bb9778afce40d1b5ea260cb116c076ca5919 100644 (file)
@@ -15,6 +15,7 @@
 #include "utils/WorkQueue.h"
 
 #include <chrono>
+#include <cinttypes>
 #include <cstddef>
 #include <cstdio>
 #include <memory>
@@ -104,11 +105,12 @@ static std::uint64_t handleOneInput(const Options &options,
     if (!options.decompress) {
       double ratio = static_cast<double>(bytesWritten) /
                      static_cast<double>(bytesRead + !bytesRead);
-      std::fprintf(stderr, "%-20s :%6.2f%%   (%6llu => %6llu bytes, %s)\n",
+      std::fprintf(stderr, "%-20s :%6.2f%%   (%6" PRIu64 " => %6" PRIu64
+                   " bytes, %s)\n",
                    inputFileName.c_str(), ratio * 100, bytesRead, bytesWritten,
                    outputFileName.c_str());
     } else {
-      std::fprintf(stderr, "%-20s: %llu bytes \n",
+      std::fprintf(stderr, "%-20s: %" PRIu64 " bytes \n",
                    inputFileName.c_str(),bytesWritten);
     }
   }