base: avoid "#if SIZE_MAX < UINT64_MAX"

This fixes a -Werror=undef failure with coreboot's compiler.
This commit is contained in:
Nigel Tao committed 2024-08-12 22:29:40 +10:00
1 parent c89b3bc6d8
commit 721e574398
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -651,7 +651,7 @@ wuffs_base__pixel_config__set(wuffs_base__pixel_config* c,
}
if (pixfmt_repr) {
do {
#if SIZE_MAX < UINT64_MAX
#if SIZE_MAX < 0xFFFFFFFFFFFFFFFFull
uint64_t wh = ((uint64_t)width) * ((uint64_t)height);
// TODO: handle things other than 1 byte per pixel.
if (wh > ((uint64_t)SIZE_MAX)) {
+1 -1
View File
@@ -4664,7 +4664,7 @@ wuffs_base__pixel_config__set(wuffs_base__pixel_config* c,
}
if (pixfmt_repr) {
do {
#if SIZE_MAX < UINT64_MAX
#if SIZE_MAX < 0xFFFFFFFFFFFFFFFFull
uint64_t wh = ((uint64_t)width) * ((uint64_t)height);
// TODO: handle things other than 1 byte per pixel.
if (wh > ((uint64_t)SIZE_MAX)) {