blob: 8fc377c31be48ac9ba76320dd815ccd577a3ab3b [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From de4a948d356c9befb88c796168e97eb05b9a3385 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 23 Apr 2018 22:54:42 -0700
4Subject: [PATCH] pbzip2: Fix invalid suffix on literal C++11 warning
5
6Fixes -Wreserved-user-defined-literal] errors.
7Also reported in launchpad here https://bugs.launchpad.net/pbzip2/+bug/1746369
8
9Upstream-Status: Submitted [https://launchpadlibrarian.net/355230152/pbzip2.patch]
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 pbzip2.cpp | 12 ++++++------
14 1 file changed, 6 insertions(+), 6 deletions(-)
15
16diff --git a/pbzip2.cpp b/pbzip2.cpp
17index 66ca978..4287ea7 100644
18--- a/pbzip2.cpp
19+++ b/pbzip2.cpp
20@@ -1220,7 +1220,7 @@ int producer_decompress(int hInfile, OFF_T fileSize, queue *fifo)
21 // give warning to user if block is larger than 250 million bytes
22 if (fileData->bufSize > 250000000)
23 {
24- fprintf(stderr, "pbzip2: *WARNING: Compressed block size is large [%"PRIuMAX" bytes].\n",
25+ fprintf(stderr, "pbzip2: *WARNING: Compressed block size is large [%" PRIuMAX " bytes].\n",
26 (uintmax_t) fileData->bufSize);
27 fprintf(stderr, " If program aborts, use regular BZIP2 to decompress.\n");
28 }
29@@ -1829,7 +1829,7 @@ void *fileWriter(void *outname)
30
31 if (QuietMode != 1)
32 {
33- fprintf(stderr, " Output Size: %"PRIuMAX" bytes\n", (uintmax_t)CompressedSize);
34+ fprintf(stderr, " Output Size: %" PRIuMAX " bytes\n", (uintmax_t)CompressedSize);
35 }
36
37 #ifdef PBZIP_DEBUG
38@@ -2072,7 +2072,7 @@ int directcompress(int hInfile, OFF_T fileSize, int blockSize, const char *OutFi
39 close(hOutfile);
40 if (QuietMode != 1)
41 {
42- fprintf(stderr, " Output Size: %"PRIuMAX" bytes\n", (uintmax_t)CompressedSize);
43+ fprintf(stderr, " Output Size: %" PRIuMAX " bytes\n", (uintmax_t)CompressedSize);
44 }
45
46 syncSetProducerDone(1); // Not really needed for direct version
47@@ -2794,7 +2794,7 @@ void outputBufferInit(size_t size)
48 // unlikely to get here since more likely exception will be thrown
49 if (OutputBuffer.size() != size)
50 {
51- fprintf(stderr, "pbzip2: *ERROR: Could not initialize (OutputBuffer); size=%"PRIuMAX"! Aborting...\n", (uintmax_t)size);
52+ fprintf(stderr, "pbzip2: *ERROR: Could not initialize (OutputBuffer); size=%" PRIuMAX "! Aborting...\n", (uintmax_t)size);
53 safe_mutex_unlock(OutMutex);
54 exit(1);
55 }
56@@ -4102,7 +4102,7 @@ int main(int argc, char* argv[])
57 if (decompress == 1)
58 fprintf(stderr, " BWT Block Size: %c00k\n", BWTblockSizeChar);
59 if (hasInFile)
60- fprintf(stderr, " Input Size: %"PRIuMAX" bytes\n", (uintmax_t)InFileSize);
61+ fprintf(stderr, " Input Size: %" PRIuMAX " bytes\n", (uintmax_t)InFileSize);
62 }
63
64 if (decompress == 1)
65@@ -4224,7 +4224,7 @@ int main(int argc, char* argv[])
66 {
67 NumBufferedBlocksMax = numCPU;
68 if (QuietMode != 1)
69- fprintf(stderr, "*Warning* Max memory limit increased to %"PRIuMAX" MB to support %d CPUs\n", (uintmax_t)((NumBufferedBlocksMax + (numCPU * 2)) * blockSize)/1000000, numCPU);
70+ fprintf(stderr, "*Warning* Max memory limit increased to %" PRIuMAX " MB to support %d CPUs\n", (uintmax_t)((NumBufferedBlocksMax + (numCPU * 2)) * blockSize)/1000000, numCPU);
71 }
72 else
73 {