[warnings] fix implicit widening conversion

This commit is contained in:
akallabeth
2024-08-26 16:33:59 +02:00
parent 4439240fd3
commit 15456e1ee1
69 changed files with 467 additions and 459 deletions

View File

@@ -269,7 +269,8 @@ static BOOL rdtk_nine_patch_get_scale_ht(rdtkNinePatch* ninePatch, wImage* image
for (uint32_t y = 1; y < image->height - 1; y++)
{
const uint32_t* pixel = (const uint32_t*)&image->data[image->scanline * y]; /* (1, 0) */
const uint32_t* pixel =
(const uint32_t*)&image->data[1ULL * image->scanline * y]; /* (1, 0) */
if (beg < 0)
{
if (*pixel)
@@ -312,8 +313,9 @@ static BOOL rdtk_nine_patch_get_fill_lr(rdtkNinePatch* ninePatch, wImage* image)
for (uint32_t x = 1; x < image->width - 1; x++)
{
const uint32_t* pixel = (uint32_t*)&image->data[((image->height - 1) * image->scanline) +
x * sizeof(uint32_t)]; /* (1, height - 1) */
const uint32_t* pixel =
(uint32_t*)&image->data[((1ULL * image->height - 1ULL) * image->scanline) +
x * sizeof(uint32_t)]; /* (1, height - 1) */
if (beg < 0)
{
if (*pixel)

View File

@@ -30,7 +30,7 @@ int rdtk_surface_fill(rdtkSurface* surface, uint16_t x, uint16_t y, uint16_t wid
for (uint32_t i = y; i < y * 1ul + height; i++)
{
uint8_t* line = &surface->data[i * surface->scanline];
uint8_t* line = &surface->data[1ULL * i * surface->scanline];
for (uint32_t j = x; j < x * 1ul + width; j++)
{
uint32_t* pixel = (uint32_t*)&line[j + 4ul];