[rdtk] fix integer cast warnings

This commit is contained in:
akallabeth 2024-09-03 12:45:35 +02:00
parent ca5a8e0625
commit 734d4ce43e
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
1 changed files with 7 additions and 7 deletions

View File

@ -434,7 +434,7 @@ static int rdtk_font_parse_descriptor_buffer(rdtkFont* font, uint8_t* buffer, si
if ((errno != 0) || (val < INT32_MIN) || (val > INT32_MAX))
return -1;
glyph->width = val;
glyph->width = (INT32)val;
}
*q = '"';
@ -471,7 +471,7 @@ static int rdtk_font_parse_descriptor_buffer(rdtkFont* font, uint8_t* buffer, si
if ((errno != 0) || (val < INT32_MIN) || (val > INT32_MAX))
return -1;
glyph->offsetX = val;
glyph->offsetX = (INT32)val;
}
{
long val = strtol(tok[1], NULL, 0);
@ -479,7 +479,7 @@ static int rdtk_font_parse_descriptor_buffer(rdtkFont* font, uint8_t* buffer, si
if ((errno != 0) || (val < INT32_MIN) || (val > INT32_MAX))
return -1;
glyph->offsetY = val;
glyph->offsetY = (INT32)val;
}
*q = '"';
p = q + 1;
@ -525,7 +525,7 @@ static int rdtk_font_parse_descriptor_buffer(rdtkFont* font, uint8_t* buffer, si
if ((errno != 0) || (val < INT32_MIN) || (val > INT32_MAX))
return -1;
glyph->rectX = val;
glyph->rectX = (INT32)val;
}
{
long val = strtol(tok[1], NULL, 0);
@ -533,7 +533,7 @@ static int rdtk_font_parse_descriptor_buffer(rdtkFont* font, uint8_t* buffer, si
if ((errno != 0) || (val < INT32_MIN) || (val > INT32_MAX))
return -1;
glyph->rectY = val;
glyph->rectY = (INT32)val;
}
{
long val = strtol(tok[2], NULL, 0);
@ -541,7 +541,7 @@ static int rdtk_font_parse_descriptor_buffer(rdtkFont* font, uint8_t* buffer, si
if ((errno != 0) || (val < INT32_MIN) || (val > INT32_MAX))
return -1;
glyph->rectWidth = val;
glyph->rectWidth = (INT32)val;
}
{
long val = strtol(tok[3], NULL, 0);
@ -549,7 +549,7 @@ static int rdtk_font_parse_descriptor_buffer(rdtkFont* font, uint8_t* buffer, si
if ((errno != 0) || (val < INT32_MIN) || (val > INT32_MAX))
return -1;
glyph->rectHeight = val;
glyph->rectHeight = (INT32)val;
}
*q = '"';
p = q + 1;