Fix MODE=optlinux and MODE=tiny builds

This commit is contained in:
Justine Tunney 2024-07-23 04:04:19 -07:00
parent 5660ec4741
commit 0602ff6bab
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
12 changed files with 75 additions and 36 deletions

View file

@ -477,7 +477,7 @@ struct __floating_decimal_64 {
2882303761517u, 576460752303u, 115292150460u, 23058430092u, 4611686018u, 922337203u, 184467440u,
36893488u, 7378697u, 1475739u, 295147u, 59029u, 11805u, 2361u, 472u, 94u, 18u, 3u };
unsigned long _Trailing_zero_bits;
unsigned long _Trailing_zero_bits = 0;
#ifdef _LIBCPP_HAS_BITSCAN64
(void) _BitScanForward64(&_Trailing_zero_bits, __v.__mantissa); // __v.__mantissa is guaranteed nonzero
#else // ^^^ 64-bit ^^^ / vvv 32-bit vvv

View file

@ -1883,7 +1883,10 @@ private:
#endif
for (; __first != __last; ++__first)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
traits_type::assign(*__dest++, *__first);
#pragma GCC diagnostic pop
return __dest;
}

View file

@ -8169,7 +8169,10 @@ if (*code == OP_CBRA)
capitem.number = capnumber;
capitem.next = cb->open_caps;
capitem.assert_depth = cb->assert_depth;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdangling-pointer"
cb->open_caps = &capitem;
#pragma GCC diagnostic pop
}
/* Offset is set zero to mark that this bracket is still open */

View file

@ -4211,9 +4211,12 @@ static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp) {
tc16[k] = (uint16_t)stbi__get16be(s); // copy the values as-is
} else {
for (k = 0; k < s->img_n; ++k)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-overflow"
tc[k] = (unsigned char)(stbi__get16be(s) & 255) *
stbi__depth_scale_table[z->depth]; // non 8-bit images
// will be larger
#pragma GCC diagnostic pop
}
}
break;

View file

@ -1202,7 +1202,10 @@ static tmbstr cleanup_description( ctmbstr description )
name = realloc(name, l_name);
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-truncation"
strncpy(name + i_name, &c, 1);
#pragma GCC diagnostic pop
i_name++;
i++;
break;