skia: Cast SkEndian_SwapBE32(n) to uint32_t on big-endian
authorCarsten Schoenert <c.schoenert@t-online.de>
Tue, 18 Jul 2023 14:02:48 +0000 (16:02 +0200)
committerCarsten Schoenert <c.schoenert@t-online.de>
Tue, 14 May 2024 19:28:37 +0000 (21:28 +0200)
On BE the byte-swapping needs to be unint32_t so cast that to that.
We have ppc64 and s390x which are Big Endian platforms.

Based on https://cgit.freebsd.org/ports/commit/?id=3110f3a0dcfdf1d5be165bbbb1ff08d720c63c48

Gbp-Pq: Topic fixes
Gbp-Pq: Name skia-Cast-SkEndian_SwapBE32-n-to-uint32_t-on-big-endian.patch

gfx/skia/skia/src/base/SkEndian.h

index 732c248802f11415b3384241ee4d5044bbca2dac..ea35557d52ca210c90ef16ea0096220a41eec246 100644 (file)
@@ -131,7 +131,7 @@ static inline void SkEndianSwap64s(uint64_t array[], int count) {
     #define SkTEndian_SwapLE64(n)    (n)
 #else   // SK_CPU_BENDIAN
     #define SkEndian_SwapBE16(n)    (n)
-    #define SkEndian_SwapBE32(n)    (n)
+    #define SkEndian_SwapBE32(n)    uint32_t(n)
     #define SkEndian_SwapBE64(n)    (n)
     #define SkEndian_SwapLE16(n)    SkEndianSwap16(n)
     #define SkEndian_SwapLE32(n)    SkEndianSwap32(n)