summaryrefslogtreecommitdiff
path: root/graphics/lepton/files/patch-warnings
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/lepton/files/patch-warnings')
-rw-r--r--graphics/lepton/files/patch-warnings123
1 files changed, 92 insertions, 31 deletions
diff --git a/graphics/lepton/files/patch-warnings b/graphics/lepton/files/patch-warnings
index ed3155b80426..992380cb67b5 100644
--- a/graphics/lepton/files/patch-warnings
+++ b/graphics/lepton/files/patch-warnings
@@ -1,19 +1,4 @@
-+++ src/io/MemMgrAllocator.cc
-@@ -185,5 +185,5 @@
- }
- if (!data) {
-- fprintf(stderr, "Insufficient memory: unable to mmap or calloc %ld bytes\n", total_size);
-+ fprintf(stderr, "Insufficient memory: unable to mmap or calloc %zu bytes\n", total_size);
- fflush(stderr);
- exit(37);
+++ test_suite/timing_driver.cc
-@@ -79,5 +81,5 @@
- }
- } else {
-- fprintf(stderr, "Files differ in size %ld != %ld\n", data_size, roundtrip_size);
-+ fprintf(stderr, "Files differ in size %zu != %zu\n", data_size, roundtrip_size);
- }
- int status;
@@ -396,5 +398,5 @@
leptonBuffer.size());
if (result != testImage.size()) {
@@ -21,13 +6,6 @@
+ fprintf(stderr, "Output Size %zu != %zu\n", result, testImage.size());
}
always_assert(result == (size_t)testImage.size() &&
-@@ -508,5 +510,5 @@
- for (std::vector<const char *>::const_iterator filename = filenames.begin(); filename != filenames.end(); ++filename) {
- testImage = load(*filename);
-- fprintf(stderr, "Loading iPhone %ld\n", testImage.size());
-+ fprintf(stderr, "Loading iPhone %u\n", testImage.size());
- int retval = run_test(testImage,
- use_lepton, jailed, inject_syscall_level, allow_progressive_files, multithread,
+++ src/lepton/validation.cc
@@ -159,5 +159,5 @@
}
@@ -40,13 +18,96 @@
@@ -339,3 +339,3 @@
static_assert(sizeof(buffer) >= header.size(), "Buffer must be able to hold header");
- uint32_t cursor = 0;
-+ ssize_t cursor = 0;
++ size_t cursor = 0;
bool finished = false;
-+++ src/lepton/jpgcoder.cc
-@@ -1101,5 +1098,5 @@
- if (false) {
- fprintf(stderr,
-- "Predicted Decompress %ld\nAllocated This Run %ld vs Max allocated %ld\nMax Peak Size %ld vs %ld\naug-gbg %ld, garbage %ld\nbit_writer %ld\nmux %d\n",
-+ "Predicted Decompress %zu\nAllocated This Run %zu vs Max allocated %zu\nMax Peak Size %zu vs %zu\naug-gbg %zu, garbage %zu\nbit_writer %zu\nmux %d\n",
- decom_memory_bound,
- Sirikata::memmgr_size_allocated(),
+@@ -576,5 +576,5 @@
+ if (del > 0) {
+ //fprintf(stderr, "D\n");
+- if (del < cursor) {
++ if ((size_t)del < cursor) {
+ //fprintf(stderr, "E %ld %ld\n", del, cursor - del);
+ memmove(buffer, buffer + del, cursor - del);
+--- src/vp8/encoder/encoder.cc 2022-04-13 03:01:03.000000000 -0400
++++ src/vp8/encoder/encoder.cc 2023-12-17 18:33:33.889333000 -0500
+@@ -380,12 +380,4 @@
+ }
+
+- double delta = 0;
+- for (int i = 0; i < 64; ++i) {
+- delta += outp[i] - outp_sans_dc[i];
+- //fprintf (stderr, "%d + %d = %d\n", outp_sans_dc[i], context.here().dc(), outp[i]);
+- }
+- delta /= 64;
+- //fprintf (stderr, "==== %f = %f =?= %d\n", delta, delta * 8, context.here().dc());
+-
+ int debug_width = LeptonDebug::getDebugWidth((int)color);
+ int offset = k_debug_block[(int)color];
+--- test_suite/test_invariants.cc 2022-04-13 03:01:03.000000000 -0400
++++ test_suite/test_invariants.cc 2023-12-17 18:37:42.915625000 -0500
+@@ -464,5 +464,5 @@
+ uint8_t* d =&aligned7d.at(0, 2, 1, 3, 2, 1, 0);
+ *d = 4;
+- size_t offset = d - (uint8_t*)nullptr;
++ size_t offset = (uintptr_t)d;
+ always_assert(0 == (offset & 15) && "Must have alignment");
+ always_assert(aligned7d.at(0, 2, 1, 3, 2, 1, 0) == 4);
+@@ -470,5 +470,5 @@
+ uint8_t* d2 =&a7.at(0, 2, 1, 3, 2, 1, 0);
+ *d2 = 5;
+- offset = d2 - (uint8_t*)nullptr;
++ offset = (uintptr_t)d2;
+ if (offset & 15) {
+ fprintf(stderr, "Array7d array doesn't require alignment");
+--- src/vp8/model/model.cc 2022-04-13 03:01:03.000000000 -0400
++++ src/vp8/model/model.cc 2023-12-17 18:40:51.433134000 -0500
+@@ -44,8 +44,8 @@
+ __m256i r1 = _mm256_loadu_si256((const __m256i*)(data + 32));
+ __m256i r2 = _mm256_loadu_si256((const __m256i*)(data + 64));
+- size_t offset = data - (char*)0;
++ size_t offset = (uintptr_t)data;
+ size_t align = 32 - (offset % 32);
+ char * dataend = (char*)end;
+- size_t offsetend = dataend - (char*)0;
++ size_t offsetend = (uintptr_t)dataend;
+ __m256i *write_end = (__m256i*)(dataend - (offsetend % 32));
+ __m256i *write_cursor = (__m256i*)(data + align);
+--- src/vp8/util/block_based_image.hh 2022-04-13 03:01:03.000000000 -0400
++++ src/vp8/util/block_based_image.hh 2023-12-17 18:41:56.054633000 -0500
+@@ -67,5 +67,5 @@
+ nblocks_ = nblocks;
+ storage_ = (uint8_t*)custom_calloc(nblocks * sizeof(Block) + 31);
+- size_t offset = storage_ - (uint8_t*)nullptr;
++ size_t offset = (uintptr_t)storage_;
+ if (offset & 31) { //needs alignment adjustment
+ image_ = (Block*)(storage_ + 32 - (offset & 31));
+--- src/lepton/idct.cc 2022-04-13 03:01:03.000000000 -0400
++++ src/lepton/idct.cc 2023-12-17 18:46:58.471208000 -0500
+@@ -198,5 +198,5 @@
+ char vintermed_storage[64 * sizeof(int32_t) + 16];
+ // align intermediate storage to 16 bytes
+- int32_t *vintermed = (int32_t*) (vintermed_storage + 16 - ((vintermed_storage - (char*)nullptr) &0xf));
++ int32_t *vintermed = (int32_t*) (vintermed_storage + 16 - ((uintptr_t)vintermed_storage &0xf));
+ using namespace idct_local;
+ // Horizontal 1-D IDCT.
+--- src/io/Zlib0.hh 2022-04-13 03:01:03.000000000 -0400
++++ src/io/Zlib0.hh 2023-12-17 18:48:25.076584000 -0500
+@@ -39,5 +39,4 @@
+ uint32_t mAdler32; // adler32 sum
+ bool mClosed;
+- uint16_t mBilledBytesLeft;
+ std::pair<uint32, JpegError> writeHeader();
+
+--- src/lepton/jpgcoder.cc 2022-04-13 03:01:03.000000000 -0400
++++ src/lepton/jpgcoder.cc 2023-12-17 18:58:02.650346000 -0500
+@@ -1245,11 +1245,4 @@
+ current_run_size = cumulative_buffer_size;
+
+- size_t bit_writer_augmentation = 0;
+- if (g_allow_progressive) {
+- for (size_t cur_size = jpgfilesize - 1; cur_size; cur_size >>=1) {
+- bit_writer_augmentation |= cur_size;
+- }
+- bit_writer_augmentation += 1; // this is used to compute the buffer size of the abit_writer for writing
+- }
+ size_t garbage_augmentation = 0;
+ for (size_t cur_size = hdrs - 1; cur_size; cur_size >>=1) {