Fix clang warning

This commit is contained in:
Patrick Pelissier committed 2024-05-28 23:14:44 +02:00
1 parent 67e9c8ff06
commit 8e70b6175a
1 file changed
+3 -1
+3 -1
View File
@@ -774,7 +774,9 @@ static void test0(void)
static void test_rounding(void)
{
const size_t max = -(m_str1ng_size_t)1;
// The final cast to size_t is due to clang which now gives
// warning even if the cast an integer to a bigger size(!)
const size_t max = (size_t) -(m_str1ng_size_t)1;
for(size_t a = max/2; a <= max; a++) {
unsigned char m, e;
size_t x = (size_t) a + a/2;