From: Debian Med Packaging Date: Sun, 15 Jan 2017 08:08:53 +0000 (+0000) Subject: Fix-use-of-fprintf X-Git-Tag: archive/raspbian/1.3.3+dfsg-2+rpi1~2^2^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8a9015e19f0d9856af09a35153e95664c5199a97;p=libzstd.git Fix-use-of-fprintf Gbp-Pq: Name 0007-Fix-use-of-fprintf.patch --- diff --git a/contrib/pzstd/Pzstd.cpp b/contrib/pzstd/Pzstd.cpp index f4cb19d..1265b53 100644 --- a/contrib/pzstd/Pzstd.cpp +++ b/contrib/pzstd/Pzstd.cpp @@ -410,7 +410,7 @@ std::uint64_t asyncCompressChunks( }); // Pass the output queue to the writer thread. chunks.push(std::move(out)); - state.log(VERBOSE, "Starting a new frame\n"); + state.log(VERBOSE, "%s\n", "Starting a new frame"); // Fill the input queue for the compression job we just started status = readData(*in, ZSTD_CStreamInSize(), step, fd, &bytesRead); } @@ -547,8 +547,8 @@ std::uint64_t asyncDecompressFrames( if (frameSize == 0) { // We hit a non SkippableFrame ==> not compressed by pzstd or corrupted // Pass the rest of the source to this decompression task - state.log(VERBOSE, - "Input not in pzstd format, falling back to serial decompression\n"); + state.log(VERBOSE, "%s\n", + "Input not in pzstd format, falling back to serial decompression"); while (status == FileStatus::Continue && !state.errorHolder.hasError()) { status = readData(*in, chunkSize, chunkSize, fd, &totalBytesRead); } diff --git a/contrib/pzstd/Pzstd.h b/contrib/pzstd/Pzstd.h index dc60dd9..1e29a71 100644 --- a/contrib/pzstd/Pzstd.h +++ b/contrib/pzstd/Pzstd.h @@ -41,7 +41,7 @@ class SharedState { auto parameters = options.determineParameters(); cStreamPool.reset(new ResourcePool{ [this, parameters]() -> ZSTD_CStream* { - this->log(VERBOSE, "Creating new ZSTD_CStream\n"); + this->log(VERBOSE, "%s\n", "Creating new ZSTD_CStream"); auto zcs = ZSTD_createCStream(); if (zcs) { auto err = ZSTD_initCStream_advanced( @@ -59,7 +59,7 @@ class SharedState { } else { dStreamPool.reset(new ResourcePool{ [this]() -> ZSTD_DStream* { - this->log(VERBOSE, "Creating new ZSTD_DStream\n"); + this->log(VERBOSE, "%s\n", "Creating new ZSTD_DStream"); auto zds = ZSTD_createDStream(); if (zds) { auto err = ZSTD_initDStream(zds);