Fix shift-sign issue in Convert.c (#7838)

* Fix shift-sign issue in Convert.c

Fixes
```
libImaging/Convert.c:513:25: error: signed shift result (0xFF000000) sets the sign bit of the shift expression's type ('int') and becomes negative [-Werror,-Wshift-sign-overflow]
    UINT32 trns = (0xff << 24) | ((b & 0xff) << 16) | ((g & 0xff) << 8) | (r & 0xff);
                   ~~~~ ^  ~~
```

---------

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
Richard Barnes 2024-03-09 01:52:00 -05:00 committed by GitHub
parent 3f5721d0b0
commit 38cec87c93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -510,7 +510,7 @@ rgbT2rgba(UINT8 *out, int xsize, int r, int g, int b) {
UINT32 trns = ((r & 0xff) << 24) | ((g & 0xff) << 16) | ((b & 0xff) << 8) | 0xff;
UINT32 repl = trns & 0xffffff00;
#else
UINT32 trns = (0xff << 24) | ((b & 0xff) << 16) | ((g & 0xff) << 8) | (r & 0xff);
UINT32 trns = (0xffU << 24) | ((b & 0xff) << 16) | ((g & 0xff) << 8) | (r & 0xff);
UINT32 repl = trns & 0x00ffffff;
#endif