From 055e944584cad323c9a4d09778c9fb920a08601e Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Wed, 27 May 2020 14:24:24 +1000 Subject: [PATCH] Make cgen io_reader pointers' elements const --- internal/cgen/base/io-private.h | 33 +- internal/cgen/data.go | 11 +- internal/cgen/statement.go | 20 +- internal/cgen/var.go | 28 +- release/c/wuffs-unsupported-snapshot.c | 425 +++++++++++++------------ 5 files changed, 276 insertions(+), 241 deletions(-) diff --git a/internal/cgen/base/io-private.h b/internal/cgen/base/io-private.h index db61e880..e4fd9ced 100644 --- a/internal/cgen/base/io-private.h +++ b/internal/cgen/base/io-private.h @@ -106,14 +106,14 @@ static inline uint32_t // wuffs_base__io_writer__copy_n32_from_reader(uint8_t** ptr_iop_w, uint8_t* io2_w, uint32_t length, - uint8_t** ptr_iop_r, - uint8_t* io2_r) { + const uint8_t** ptr_iop_r, + const uint8_t* io2_r) { uint8_t* iop_w = *ptr_iop_w; size_t n = length; if (n > ((size_t)(io2_w - iop_w))) { n = (size_t)(io2_w - iop_w); } - uint8_t* iop_r = *ptr_iop_r; + const uint8_t* iop_r = *ptr_iop_r; if (n > ((size_t)(io2_r - iop_r))) { n = (size_t)(io2_r - iop_r); } @@ -176,8 +176,8 @@ wuffs_base__io_writer__copy_n32_from_slice(uint8_t** ptr_iop_w, // - 1 means inconclusive, equivalent to "$short read". // - 2 means failure. static inline uint32_t // -wuffs_base__io_reader__match7(uint8_t* iop_r, - uint8_t* io2_r, +wuffs_base__io_reader__match7(const uint8_t* iop_r, + const uint8_t* io2_r, wuffs_base__io_buffer* r, uint64_t a) { uint32_t n = a & 7; @@ -201,10 +201,10 @@ wuffs_base__io_reader__match7(uint8_t* iop_r, static inline wuffs_base__io_buffer* // wuffs_base__io_reader__set(wuffs_base__io_buffer* b, - uint8_t** ptr_iop_r, - uint8_t** ptr_io0_r, - uint8_t** ptr_io1_r, - uint8_t** ptr_io2_r, + const uint8_t** ptr_iop_r, + const uint8_t** ptr_io0_r, + const uint8_t** ptr_io1_r, + const uint8_t** ptr_io2_r, wuffs_base__slice_u8 data) { b->data = data; b->meta.wi = data.len; @@ -220,15 +220,24 @@ wuffs_base__io_reader__set(wuffs_base__io_buffer* b, return b; } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-qual" +// TODO: can we avoid the const_cast (by deleting this function)? This might +// involve converting the call sites to take an io_reader instead of a slice u8 +// (the result of io_reader.take). static inline wuffs_base__slice_u8 // -wuffs_base__io_reader__take(uint8_t** ptr_iop_r, uint8_t* io2_r, uint64_t n) { +wuffs_base__io_reader__take(const uint8_t** ptr_iop_r, + const uint8_t* io2_r, + uint64_t n) { if (n <= ((size_t)(io2_r - *ptr_iop_r))) { - uint8_t* p = *ptr_iop_r; + const uint8_t* p = *ptr_iop_r; *ptr_iop_r += n; - return wuffs_base__make_slice_u8(p, n); + // The arg is what C calls C++'s "const_cast(p)". + return wuffs_base__make_slice_u8((uint8_t*)(p), n); } return wuffs_base__make_slice_u8(NULL, 0); } +#pragma GCC diagnostic pop static inline wuffs_base__io_buffer* // wuffs_base__io_writer__set(wuffs_base__io_buffer* b, diff --git a/internal/cgen/data.go b/internal/cgen/data.go index abdef5fe..dc460462 100644 --- a/internal/cgen/data.go +++ b/internal/cgen/data.go @@ -327,11 +327,12 @@ const baseImagePublicH = "" + const baseIOPrivateH = "" + "// ---------------- I/O\n\nstatic inline uint64_t //\nwuffs_base__io__count_since(uint64_t mark, uint64_t index) {\n if (index >= mark) {\n return index - mark;\n }\n return 0;\n}\n\nstatic inline wuffs_base__slice_u8 //\nwuffs_base__io__since(uint64_t mark, uint64_t index, uint8_t* ptr) {\n if (index >= mark) {\n return wuffs_base__make_slice_u8(ptr + mark, index - mark);\n }\n return wuffs_base__make_slice_u8(NULL, 0);\n}\n\nstatic inline uint32_t //\nwuffs_base__io_writer__copy_n32_from_history(uint8_t** ptr_iop_w,\n uint8_t* io1_w,\n uint8_t* io2_w,\n uint32_t length,\n uint32_t distance) {\n if (!distance) {\n return 0;\n }\n uint8_t* p = *ptr_iop_w;\n if ((size_t)(p - io1_w) < (size_t)(distance)) {\n return 0;\n }\n uint8_t* q = p - distance;\n size_t n = (size_t)(io2_w - p);\n if ((size_t)(length) > n) {\n length = (uint32_t)(n);\n " + " } else {\n n = (size_t)(length);\n }\n // TODO: unrolling by 3 seems best for the std/deflate benchmarks, but that\n // is mostly because 3 is the minimum length for the deflate format. This\n // function implementation shouldn't overfit to that one format. Perhaps the\n // copy_n32_from_history Wuffs method should also take an unroll hint\n // argument, and the cgen can look if that argument is the constant\n // expression '3'.\n //\n // See also wuffs_base__io_writer__copy_n32_from_history_fast below.\n //\n // Alternatively, or additionally, have a sloppy_copy_n32_from_history method\n // that copies 8 bytes at a time, possibly writing more than length bytes?\n for (; n >= 3; n -= 3) {\n *p++ = *q++;\n *p++ = *q++;\n *p++ = *q++;\n }\n for (; n; n--) {\n *p++ = *q++;\n }\n *ptr_iop_w = p;\n return length;\n}\n\n// wuffs_base__io_writer__copy_n32_from_history_fast is like the\n// wuffs_base__io_writer__copy_n32_from_history function above, but has\n// stronger pre-conditions. The caller needs to prove" + - " that:\n// - distance > 0\n// - distance <= (*ptr_iop_w - io1_w)\n// - length <= (io2_w - *ptr_iop_w)\nstatic inline uint32_t //\nwuffs_base__io_writer__copy_n32_from_history_fast(uint8_t** ptr_iop_w,\n uint8_t* io1_w,\n uint8_t* io2_w,\n uint32_t length,\n uint32_t distance) {\n uint8_t* p = *ptr_iop_w;\n uint8_t* q = p - distance;\n uint32_t n = length;\n for (; n >= 3; n -= 3) {\n *p++ = *q++;\n *p++ = *q++;\n *p++ = *q++;\n }\n for (; n; n--) {\n *p++ = *q++;\n }\n *ptr_iop_w = p;\n return length;\n}\n\nstatic inline uint32_t //\nwuffs_base__io_writer__copy_n32_from_reader(uint8_t** ptr_iop_w,\n uint8_t* io2_w,\n uint32_t length,\n uint8_t** ptr_iop_r,\n " + - " uint8_t* io2_r) {\n uint8_t* iop_w = *ptr_iop_w;\n size_t n = length;\n if (n > ((size_t)(io2_w - iop_w))) {\n n = (size_t)(io2_w - iop_w);\n }\n uint8_t* iop_r = *ptr_iop_r;\n if (n > ((size_t)(io2_r - iop_r))) {\n n = (size_t)(io2_r - iop_r);\n }\n if (n > 0) {\n memmove(iop_w, iop_r, n);\n *ptr_iop_w += n;\n *ptr_iop_r += n;\n }\n return (uint32_t)(n);\n}\n\nstatic inline uint64_t //\nwuffs_base__io_writer__copy_from_slice(uint8_t** ptr_iop_w,\n uint8_t* io2_w,\n wuffs_base__slice_u8 src) {\n uint8_t* iop_w = *ptr_iop_w;\n size_t n = src.len;\n if (n > ((size_t)(io2_w - iop_w))) {\n n = (size_t)(io2_w - iop_w);\n }\n if (n > 0) {\n memmove(iop_w, src.ptr, n);\n *ptr_iop_w += n;\n }\n return (uint64_t)(n);\n}\n\nstatic inline uint32_t //\nwuffs_base__io_writer__copy_n32_from_slice(uint8_t** ptr_iop_w,\n uint8_t* io2_w,\n uint32_t" + - " length,\n wuffs_base__slice_u8 src) {\n uint8_t* iop_w = *ptr_iop_w;\n size_t n = src.len;\n if (n > length) {\n n = length;\n }\n if (n > ((size_t)(io2_w - iop_w))) {\n n = (size_t)(io2_w - iop_w);\n }\n if (n > 0) {\n memmove(iop_w, src.ptr, n);\n *ptr_iop_w += n;\n }\n return (uint32_t)(n);\n}\n\n// wuffs_base__io_reader__match7 returns whether the io_reader's upcoming bytes\n// start with the given prefix (up to 7 bytes long). It is peek-like, not\n// read-like, in that there are no side-effects.\n//\n// The low 3 bits of a hold the prefix length, n.\n//\n// The high 56 bits of a hold the prefix itself, in little-endian order. The\n// first prefix byte is in bits 8..=15, the second prefix byte is in bits\n// 16..=23, etc. The high (8 * (7 - n)) bits are ignored.\n//\n// There are three possible return values:\n// - 0 means success.\n// - 1 means inconclusive, equivalent to \"$short read\".\n// - 2 means failure.\nstatic inline uint32_t //\nwuffs_base__io_reader__match7(ui" + - "nt8_t* iop_r,\n uint8_t* io2_r,\n wuffs_base__io_buffer* r,\n uint64_t a) {\n uint32_t n = a & 7;\n a >>= 8;\n if ((io2_r - iop_r) >= 8) {\n uint64_t x = wuffs_base__load_u64le__no_bounds_check(iop_r);\n uint32_t shift = 8 * (8 - n);\n return ((a << shift) == (x << shift)) ? 0 : 2;\n }\n for (; n > 0; n--) {\n if (iop_r >= io2_r) {\n return (r && r->meta.closed) ? 2 : 1;\n } else if (*iop_r != ((uint8_t)(a))) {\n return 2;\n }\n iop_r++;\n a >>= 8;\n }\n return 0;\n}\n\nstatic inline wuffs_base__io_buffer* //\nwuffs_base__io_reader__set(wuffs_base__io_buffer* b,\n uint8_t** ptr_iop_r,\n uint8_t** ptr_io0_r,\n uint8_t** ptr_io1_r,\n uint8_t** ptr_io2_r,\n wuffs_base__slice_u8 data) {\n b->data = data;\n b->meta.wi = data.len;\n b->meta.ri = 0;\n b->meta.pos = 0;\n b->meta.closed = fal" + - "se;\n\n *ptr_iop_r = data.ptr;\n *ptr_io0_r = data.ptr;\n *ptr_io1_r = data.ptr;\n *ptr_io2_r = data.ptr + data.len;\n\n return b;\n}\n\nstatic inline wuffs_base__slice_u8 //\nwuffs_base__io_reader__take(uint8_t** ptr_iop_r, uint8_t* io2_r, uint64_t n) {\n if (n <= ((size_t)(io2_r - *ptr_iop_r))) {\n uint8_t* p = *ptr_iop_r;\n *ptr_iop_r += n;\n return wuffs_base__make_slice_u8(p, n);\n }\n return wuffs_base__make_slice_u8(NULL, 0);\n}\n\nstatic inline wuffs_base__io_buffer* //\nwuffs_base__io_writer__set(wuffs_base__io_buffer* b,\n uint8_t** ptr_iop_w,\n uint8_t** ptr_io0_w,\n uint8_t** ptr_io1_w,\n uint8_t** ptr_io2_w,\n wuffs_base__slice_u8 data) {\n b->data = data;\n b->meta.wi = 0;\n b->meta.ri = 0;\n b->meta.pos = 0;\n b->meta.closed = false;\n\n *ptr_iop_w = data.ptr;\n *ptr_io0_w = data.ptr;\n *ptr_io1_w = data.ptr;\n *ptr_io2_w = data.ptr + data.len;\n\n return b;\n}\n\n " + + " that:\n// - distance > 0\n// - distance <= (*ptr_iop_w - io1_w)\n// - length <= (io2_w - *ptr_iop_w)\nstatic inline uint32_t //\nwuffs_base__io_writer__copy_n32_from_history_fast(uint8_t** ptr_iop_w,\n uint8_t* io1_w,\n uint8_t* io2_w,\n uint32_t length,\n uint32_t distance) {\n uint8_t* p = *ptr_iop_w;\n uint8_t* q = p - distance;\n uint32_t n = length;\n for (; n >= 3; n -= 3) {\n *p++ = *q++;\n *p++ = *q++;\n *p++ = *q++;\n }\n for (; n; n--) {\n *p++ = *q++;\n }\n *ptr_iop_w = p;\n return length;\n}\n\nstatic inline uint32_t //\nwuffs_base__io_writer__copy_n32_from_reader(uint8_t** ptr_iop_w,\n uint8_t* io2_w,\n uint32_t length,\n const uint8_t** ptr_iop_r,\n " + + " const uint8_t* io2_r) {\n uint8_t* iop_w = *ptr_iop_w;\n size_t n = length;\n if (n > ((size_t)(io2_w - iop_w))) {\n n = (size_t)(io2_w - iop_w);\n }\n const uint8_t* iop_r = *ptr_iop_r;\n if (n > ((size_t)(io2_r - iop_r))) {\n n = (size_t)(io2_r - iop_r);\n }\n if (n > 0) {\n memmove(iop_w, iop_r, n);\n *ptr_iop_w += n;\n *ptr_iop_r += n;\n }\n return (uint32_t)(n);\n}\n\nstatic inline uint64_t //\nwuffs_base__io_writer__copy_from_slice(uint8_t** ptr_iop_w,\n uint8_t* io2_w,\n wuffs_base__slice_u8 src) {\n uint8_t* iop_w = *ptr_iop_w;\n size_t n = src.len;\n if (n > ((size_t)(io2_w - iop_w))) {\n n = (size_t)(io2_w - iop_w);\n }\n if (n > 0) {\n memmove(iop_w, src.ptr, n);\n *ptr_iop_w += n;\n }\n return (uint64_t)(n);\n}\n\nstatic inline uint32_t //\nwuffs_base__io_writer__copy_n32_from_slice(uint8_t** ptr_iop_w,\n uint8_t* io2_w,\n " + + " uint32_t length,\n wuffs_base__slice_u8 src) {\n uint8_t* iop_w = *ptr_iop_w;\n size_t n = src.len;\n if (n > length) {\n n = length;\n }\n if (n > ((size_t)(io2_w - iop_w))) {\n n = (size_t)(io2_w - iop_w);\n }\n if (n > 0) {\n memmove(iop_w, src.ptr, n);\n *ptr_iop_w += n;\n }\n return (uint32_t)(n);\n}\n\n// wuffs_base__io_reader__match7 returns whether the io_reader's upcoming bytes\n// start with the given prefix (up to 7 bytes long). It is peek-like, not\n// read-like, in that there are no side-effects.\n//\n// The low 3 bits of a hold the prefix length, n.\n//\n// The high 56 bits of a hold the prefix itself, in little-endian order. The\n// first prefix byte is in bits 8..=15, the second prefix byte is in bits\n// 16..=23, etc. The high (8 * (7 - n)) bits are ignored.\n//\n// There are three possible return values:\n// - 0 means success.\n// - 1 means inconclusive, equivalent to \"$short read\".\n// - 2 means failure.\nstatic inline uint32_t //\nwuffs_base__io" + + "_reader__match7(const uint8_t* iop_r,\n const uint8_t* io2_r,\n wuffs_base__io_buffer* r,\n uint64_t a) {\n uint32_t n = a & 7;\n a >>= 8;\n if ((io2_r - iop_r) >= 8) {\n uint64_t x = wuffs_base__load_u64le__no_bounds_check(iop_r);\n uint32_t shift = 8 * (8 - n);\n return ((a << shift) == (x << shift)) ? 0 : 2;\n }\n for (; n > 0; n--) {\n if (iop_r >= io2_r) {\n return (r && r->meta.closed) ? 2 : 1;\n } else if (*iop_r != ((uint8_t)(a))) {\n return 2;\n }\n iop_r++;\n a >>= 8;\n }\n return 0;\n}\n\nstatic inline wuffs_base__io_buffer* //\nwuffs_base__io_reader__set(wuffs_base__io_buffer* b,\n const uint8_t** ptr_iop_r,\n const uint8_t** ptr_io0_r,\n const uint8_t** ptr_io1_r,\n const uint8_t** ptr_io2_r,\n wuffs_base__slice_u8 data) {\n b->data = data;\n b->meta.wi = data.len;\n b->" + + "meta.ri = 0;\n b->meta.pos = 0;\n b->meta.closed = false;\n\n *ptr_iop_r = data.ptr;\n *ptr_io0_r = data.ptr;\n *ptr_io1_r = data.ptr;\n *ptr_io2_r = data.ptr + data.len;\n\n return b;\n}\n\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wcast-qual\"\n// TODO: can we avoid the const_cast (by deleting this function)? This might\n// involve converting the call sites to take an io_reader instead of a slice u8\n// (the result of io_reader.take).\nstatic inline wuffs_base__slice_u8 //\nwuffs_base__io_reader__take(const uint8_t** ptr_iop_r,\n const uint8_t* io2_r,\n uint64_t n) {\n if (n <= ((size_t)(io2_r - *ptr_iop_r))) {\n const uint8_t* p = *ptr_iop_r;\n *ptr_iop_r += n;\n // The arg is what C calls C++'s \"const_cast(p)\".\n return wuffs_base__make_slice_u8((uint8_t*)(p), n);\n }\n return wuffs_base__make_slice_u8(NULL, 0);\n}\n#pragma GCC diagnostic pop\n\nstatic inline wuffs_base__io_buffer* //\nwuffs_base__io_writer__set(wuffs_base__io_buff" + + "er* b,\n uint8_t** ptr_iop_w,\n uint8_t** ptr_io0_w,\n uint8_t** ptr_io1_w,\n uint8_t** ptr_io2_w,\n wuffs_base__slice_u8 data) {\n b->data = data;\n b->meta.wi = 0;\n b->meta.ri = 0;\n b->meta.pos = 0;\n b->meta.closed = false;\n\n *ptr_iop_w = data.ptr;\n *ptr_io0_w = data.ptr;\n *ptr_io1_w = data.ptr;\n *ptr_io2_w = data.ptr + data.len;\n\n return b;\n}\n\n " + "" + "// ---------------- I/O (Utility)\n\n#define wuffs_base__utility__empty_io_reader wuffs_base__empty_io_reader\n#define wuffs_base__utility__empty_io_writer wuffs_base__empty_io_writer\n" + "" diff --git a/internal/cgen/statement.go b/internal/cgen/statement.go index fd19ad36..b4e17fb8 100644 --- a/internal/cgen/statement.go +++ b/internal/cgen/statement.go @@ -262,9 +262,9 @@ func (g *gen) writeStatementIOBind(b *buffer, n *a.IOBind, depth uint32) error { if e.Operator() != 0 { prefix = aPrefix } - cTyp := "reader" + cTyp, qualifier := "reader", "const " if e.MType().QID()[1] == t.IDIOWriter { - cTyp = "writer" + cTyp, qualifier = "writer", "" } name := e.Ident().Str(g.tm) b.printf("wuffs_base__io_buffer* %s%d_%s%s = %s%s;\n", @@ -274,14 +274,14 @@ func (g *gen) writeStatementIOBind(b *buffer, n *a.IOBind, depth uint32) error { // does this work if the io_bind body advances these pointers, either // directly or by calling other funcs? if e.Operator() == 0 { - b.printf("uint8_t *%s%d_%s%s%s = %s%s%s;\n", - oPrefix, ioBindNum, iopPrefix, prefix, name, iopPrefix, prefix, name) - b.printf("uint8_t *%s%d_%s%s%s = %s%s%s;\n", - oPrefix, ioBindNum, io0Prefix, prefix, name, io0Prefix, prefix, name) - b.printf("uint8_t *%s%d_%s%s%s = %s%s%s;\n", - oPrefix, ioBindNum, io1Prefix, prefix, name, io1Prefix, prefix, name) - b.printf("uint8_t *%s%d_%s%s%s = %s%s%s;\n", - oPrefix, ioBindNum, io2Prefix, prefix, name, io2Prefix, prefix, name) + b.printf("%suint8_t *%s%d_%s%s%s = %s%s%s;\n", + qualifier, oPrefix, ioBindNum, iopPrefix, prefix, name, iopPrefix, prefix, name) + b.printf("%suint8_t *%s%d_%s%s%s = %s%s%s;\n", + qualifier, oPrefix, ioBindNum, io0Prefix, prefix, name, io0Prefix, prefix, name) + b.printf("%suint8_t *%s%d_%s%s%s = %s%s%s;\n", + qualifier, oPrefix, ioBindNum, io1Prefix, prefix, name, io1Prefix, prefix, name) + b.printf("%suint8_t *%s%d_%s%s%s = %s%s%s;\n", + qualifier, oPrefix, ioBindNum, io2Prefix, prefix, name, io2Prefix, prefix, name) } if n.Keyword() == t.IDIOBind { diff --git a/internal/cgen/var.go b/internal/cgen/var.go index 4828f525..9c3e3d7c 100644 --- a/internal/cgen/var.go +++ b/internal/cgen/var.go @@ -86,9 +86,17 @@ func (g *gen) writeLoadDerivedVar(b *buffer, hack string, prefix string, name t. elem := "" if typ.IsIOType() { - elem = "uint8_t" + if typ.QID()[1] == t.IDIOReader { + elem = "const uint8_t" + } else { + elem = "uint8_t" + } } else if typ.IsTokenType() { - elem = "wuffs_base__token" + if typ.QID()[1] == t.IDTokenReader { + elem = "const wuffs_base__token" + } else { + elem = "wuffs_base__token" + } } else { return nil } @@ -303,10 +311,18 @@ func (g *gen) writeVars(b *buffer, f *funk, inStructDecl bool) error { } if typ.IsIOType() { - b.printf("uint8_t* %s%s%s WUFFS_BASE__POTENTIALLY_UNUSED = NULL;\n", iopPrefix, vPrefix, name) - b.printf("uint8_t* %s%s%s WUFFS_BASE__POTENTIALLY_UNUSED = NULL;\n", io0Prefix, vPrefix, name) - b.printf("uint8_t* %s%s%s WUFFS_BASE__POTENTIALLY_UNUSED = NULL;\n", io1Prefix, vPrefix, name) - b.printf("uint8_t* %s%s%s WUFFS_BASE__POTENTIALLY_UNUSED = NULL;\n", io2Prefix, vPrefix, name) + qualifier := "" + if typ.QID()[1] == t.IDIOReader { + qualifier = "const " + } + b.printf("%suint8_t* %s%s%s WUFFS_BASE__POTENTIALLY_UNUSED = NULL;\n", + qualifier, iopPrefix, vPrefix, name) + b.printf("%suint8_t* %s%s%s WUFFS_BASE__POTENTIALLY_UNUSED = NULL;\n", + qualifier, io0Prefix, vPrefix, name) + b.printf("%suint8_t* %s%s%s WUFFS_BASE__POTENTIALLY_UNUSED = NULL;\n", + qualifier, io1Prefix, vPrefix, name) + b.printf("%suint8_t* %s%s%s WUFFS_BASE__POTENTIALLY_UNUSED = NULL;\n", + qualifier, io2Prefix, vPrefix, name) } } return nil diff --git a/release/c/wuffs-unsupported-snapshot.c b/release/c/wuffs-unsupported-snapshot.c index 8ec91866..b5bf088d 100644 --- a/release/c/wuffs-unsupported-snapshot.c +++ b/release/c/wuffs-unsupported-snapshot.c @@ -7713,14 +7713,14 @@ static inline uint32_t // wuffs_base__io_writer__copy_n32_from_reader(uint8_t** ptr_iop_w, uint8_t* io2_w, uint32_t length, - uint8_t** ptr_iop_r, - uint8_t* io2_r) { + const uint8_t** ptr_iop_r, + const uint8_t* io2_r) { uint8_t* iop_w = *ptr_iop_w; size_t n = length; if (n > ((size_t)(io2_w - iop_w))) { n = (size_t)(io2_w - iop_w); } - uint8_t* iop_r = *ptr_iop_r; + const uint8_t* iop_r = *ptr_iop_r; if (n > ((size_t)(io2_r - iop_r))) { n = (size_t)(io2_r - iop_r); } @@ -7783,8 +7783,8 @@ wuffs_base__io_writer__copy_n32_from_slice(uint8_t** ptr_iop_w, // - 1 means inconclusive, equivalent to "$short read". // - 2 means failure. static inline uint32_t // -wuffs_base__io_reader__match7(uint8_t* iop_r, - uint8_t* io2_r, +wuffs_base__io_reader__match7(const uint8_t* iop_r, + const uint8_t* io2_r, wuffs_base__io_buffer* r, uint64_t a) { uint32_t n = a & 7; @@ -7808,10 +7808,10 @@ wuffs_base__io_reader__match7(uint8_t* iop_r, static inline wuffs_base__io_buffer* // wuffs_base__io_reader__set(wuffs_base__io_buffer* b, - uint8_t** ptr_iop_r, - uint8_t** ptr_io0_r, - uint8_t** ptr_io1_r, - uint8_t** ptr_io2_r, + const uint8_t** ptr_iop_r, + const uint8_t** ptr_io0_r, + const uint8_t** ptr_io1_r, + const uint8_t** ptr_io2_r, wuffs_base__slice_u8 data) { b->data = data; b->meta.wi = data.len; @@ -7827,15 +7827,24 @@ wuffs_base__io_reader__set(wuffs_base__io_buffer* b, return b; } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-qual" +// TODO: can we avoid the const_cast (by deleting this function)? This might +// involve converting the call sites to take an io_reader instead of a slice u8 +// (the result of io_reader.take). static inline wuffs_base__slice_u8 // -wuffs_base__io_reader__take(uint8_t** ptr_iop_r, uint8_t* io2_r, uint64_t n) { +wuffs_base__io_reader__take(const uint8_t** ptr_iop_r, + const uint8_t* io2_r, + uint64_t n) { if (n <= ((size_t)(io2_r - *ptr_iop_r))) { - uint8_t* p = *ptr_iop_r; + const uint8_t* p = *ptr_iop_r; *ptr_iop_r += n; - return wuffs_base__make_slice_u8(p, n); + // The arg is what C calls C++'s "const_cast(p)". + return wuffs_base__make_slice_u8((uint8_t*)(p), n); } return wuffs_base__make_slice_u8(NULL, 0); } +#pragma GCC diagnostic pop static inline wuffs_base__io_buffer* // wuffs_base__io_writer__set(wuffs_base__io_buffer* b, @@ -12123,10 +12132,10 @@ wuffs_bmp__decoder__decode_image_config(wuffs_bmp__decoder* self, uint32_t v_bits_per_pixel = 0; uint32_t v_compression = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -12713,10 +12722,10 @@ wuffs_bmp__decoder__decode_frame_config(wuffs_bmp__decoder* self, self->private_impl.active_coroutine = 0; wuffs_base__status status = wuffs_base__make_status(NULL); - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -12837,10 +12846,10 @@ wuffs_bmp__decoder__decode_frame(wuffs_bmp__decoder* self, uint64_t v_n = 0; wuffs_base__slice_u8 v_src = {0}; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -13111,10 +13120,10 @@ wuffs_bmp__decoder__skip_frame(wuffs_bmp__decoder* self, wuffs_base__io_buffer* a_src) { wuffs_base__status status = wuffs_base__make_status(NULL); - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -14840,10 +14849,10 @@ wuffs_deflate__decoder__decode_blocks(wuffs_deflate__decoder* self, uint32_t v_type = 0; wuffs_base__status v_status = wuffs_base__make_status(NULL); - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -15001,10 +15010,10 @@ wuffs_deflate__decoder__decode_uncompressed(wuffs_deflate__decoder* self, io2_a_dst = iop_a_dst; } } - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -15169,10 +15178,10 @@ wuffs_deflate__decoder__init_dynamic_huffman(wuffs_deflate__decoder* self, uint32_t v_rep_count = 0; uint32_t v_b3 = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -15725,10 +15734,10 @@ wuffs_deflate__decoder__decode_huffman_fast(wuffs_deflate__decoder* self, io2_a_dst = iop_a_dst; } } - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -16028,10 +16037,10 @@ wuffs_deflate__decoder__decode_huffman_slow(wuffs_deflate__decoder* self, io2_a_dst = iop_a_dst; } } - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -16689,10 +16698,10 @@ wuffs_lzw__decoder__read_from(wuffs_lzw__decoder* self, uint16_t v_lm1_b = 0; uint16_t v_lm1_a = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -17523,10 +17532,10 @@ wuffs_gif__config_decoder__tell_me_more(wuffs_gif__config_decoder* self, uint64_t v_chunk_length = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -17777,10 +17786,10 @@ wuffs_gif__config_decoder__decode_frame_config(wuffs_gif__config_decoder* self, uint32_t v_background_color = 0; uint8_t v_flags = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -17918,10 +17927,10 @@ wuffs_gif__config_decoder__skip_frame(wuffs_gif__config_decoder* self, uint8_t v_flags = 0; uint8_t v_lw = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -18074,10 +18083,10 @@ wuffs_gif__config_decoder__decode_up_to_id_part1( uint8_t v_block_type = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -18185,10 +18194,10 @@ wuffs_gif__config_decoder__decode_header(wuffs_gif__config_decoder* self, uint8_t v_c[6] = {0}; uint32_t v_i = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -18258,10 +18267,10 @@ wuffs_gif__config_decoder__decode_lsd(wuffs_gif__config_decoder* self, uint32_t v_j = 0; uint32_t v_argb = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -18473,10 +18482,10 @@ wuffs_gif__config_decoder__decode_extension(wuffs_gif__config_decoder* self, uint8_t v_label = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -18567,10 +18576,10 @@ wuffs_gif__config_decoder__skip_blocks(wuffs_gif__config_decoder* self, uint8_t v_block_size = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -18643,10 +18652,10 @@ wuffs_gif__config_decoder__decode_ae(wuffs_gif__config_decoder* self, bool v_is_iccp = false; bool v_is_xmp = false; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -18884,10 +18893,10 @@ wuffs_gif__config_decoder__decode_gc(wuffs_gif__config_decoder* self, uint8_t v_flags = 0; uint16_t v_gc_duration_centiseconds = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -19012,10 +19021,10 @@ wuffs_gif__config_decoder__decode_id_part0(wuffs_gif__config_decoder* self, wuffs_base__io_buffer* a_src) { wuffs_base__status status = wuffs_base__make_status(NULL); - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -19348,10 +19357,10 @@ wuffs_gif__decoder__tell_me_more(wuffs_gif__decoder* self, uint64_t v_chunk_length = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -19606,10 +19615,10 @@ wuffs_gif__decoder__decode_frame_config(wuffs_gif__decoder* self, uint32_t v_background_color = 0; uint8_t v_flags = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -19747,10 +19756,10 @@ wuffs_gif__decoder__skip_frame(wuffs_gif__decoder* self, uint8_t v_flags = 0; uint8_t v_lw = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -19944,10 +19953,10 @@ wuffs_gif__decoder__decode_up_to_id_part1(wuffs_gif__decoder* self, uint8_t v_block_type = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -20055,10 +20064,10 @@ wuffs_gif__decoder__decode_header(wuffs_gif__decoder* self, uint8_t v_c[6] = {0}; uint32_t v_i = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -20128,10 +20137,10 @@ wuffs_gif__decoder__decode_lsd(wuffs_gif__decoder* self, uint32_t v_j = 0; uint32_t v_argb = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -20343,10 +20352,10 @@ wuffs_gif__decoder__decode_extension(wuffs_gif__decoder* self, uint8_t v_label = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -20437,10 +20446,10 @@ wuffs_gif__decoder__skip_blocks(wuffs_gif__decoder* self, uint8_t v_block_size = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -20513,10 +20522,10 @@ wuffs_gif__decoder__decode_ae(wuffs_gif__decoder* self, bool v_is_iccp = false; bool v_is_xmp = false; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -20754,10 +20763,10 @@ wuffs_gif__decoder__decode_gc(wuffs_gif__decoder* self, uint8_t v_flags = 0; uint16_t v_gc_duration_centiseconds = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -20882,10 +20891,10 @@ wuffs_gif__decoder__decode_id_part0(wuffs_gif__decoder* self, wuffs_base__io_buffer* a_src) { wuffs_base__status status = wuffs_base__make_status(NULL); - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -21067,10 +21076,10 @@ wuffs_gif__decoder__decode_id_part1(wuffs_gif__decoder* self, wuffs_base__status v_status = wuffs_base__make_status(NULL); uint8_t v_lw = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -21268,19 +21277,19 @@ wuffs_gif__decoder__decode_id_part2(wuffs_gif__decoder* self, wuffs_base__slice_u8 v_compressed = {0}; wuffs_base__io_buffer u_r = wuffs_base__empty_io_buffer(); wuffs_base__io_buffer* v_r = &u_r; - uint8_t* iop_v_r WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io0_v_r WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_v_r WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_v_r WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_v_r WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io0_v_r WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_v_r WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_v_r WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint64_t v_mark = 0; wuffs_base__status v_lzw_status = wuffs_base__make_status(NULL); wuffs_base__status v_copy_status = wuffs_base__make_status(NULL); wuffs_base__slice_u8 v_uncompressed = {0}; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -21366,10 +21375,10 @@ wuffs_gif__decoder__decode_id_part2(wuffs_gif__decoder* self, } { wuffs_base__io_buffer* o_0_v_r = v_r; - uint8_t* o_0_iop_v_r = iop_v_r; - uint8_t* o_0_io0_v_r = io0_v_r; - uint8_t* o_0_io1_v_r = io1_v_r; - uint8_t* o_0_io2_v_r = io2_v_r; + const uint8_t* o_0_iop_v_r = iop_v_r; + const uint8_t* o_0_io0_v_r = io0_v_r; + const uint8_t* o_0_io1_v_r = io1_v_r; + const uint8_t* o_0_io2_v_r = io2_v_r; v_r = wuffs_base__io_reader__set( &u_r, &iop_v_r, &io0_v_r, &io1_v_r, &io2_v_r, wuffs_base__slice_u8__subslice_ij( @@ -21864,10 +21873,10 @@ wuffs_gzip__decoder__transform_io(wuffs_gzip__decoder* self, io2_a_dst = iop_a_dst; } } - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -22578,10 +22587,10 @@ wuffs_json__decoder__decode_tokens(wuffs_json__decoder* self, io2_a_dst = iop_a_dst; } } - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -23726,10 +23735,10 @@ wuffs_json__decoder__decode_number(wuffs_json__decoder* self, uint32_t v_n = 0; uint32_t v_floating_point = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -23860,10 +23869,10 @@ wuffs_json__decoder__decode_digits(wuffs_json__decoder* self, uint8_t v_c = 0; uint32_t v_n = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -23924,10 +23933,10 @@ wuffs_json__decoder__decode_leading(wuffs_json__decoder* self, io2_a_dst = iop_a_dst; } } - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -24036,10 +24045,10 @@ wuffs_json__decoder__decode_comment(wuffs_json__decoder* self, io2_a_dst = iop_a_dst; } } - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -24221,10 +24230,10 @@ wuffs_json__decoder__decode_inf_nan(wuffs_json__decoder* self, io2_a_dst = iop_a_dst; } } - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -24389,10 +24398,10 @@ wuffs_json__decoder__decode_trailing_new_line(wuffs_json__decoder* self, io2_a_dst = iop_a_dst; } } - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -24656,10 +24665,10 @@ wuffs_wbmp__decoder__decode_image_config(wuffs_wbmp__decoder* self, uint32_t v_x32 = 0; uint64_t v_x64 = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -24794,10 +24803,10 @@ wuffs_wbmp__decoder__decode_frame_config(wuffs_wbmp__decoder* self, self->private_impl.active_coroutine = 0; wuffs_base__status status = wuffs_base__make_status(NULL); - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -24925,10 +24934,10 @@ wuffs_wbmp__decoder__decode_frame(wuffs_wbmp__decoder* self, uint8_t v_src[1] = {0}; uint8_t v_c = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -25075,10 +25084,10 @@ wuffs_wbmp__decoder__skip_frame(wuffs_wbmp__decoder* self, uint64_t v_bytes_per_row = 0; uint64_t v_total_bytes = 0; - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri; @@ -25549,10 +25558,10 @@ wuffs_zlib__decoder__transform_io(wuffs_zlib__decoder* self, io2_a_dst = iop_a_dst; } } - uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; - uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* iop_a_src = NULL; + const uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + const uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { io0_a_src = a_src->data.ptr; io1_a_src = io0_a_src + a_src->meta.ri;