[uwac] fix narrowing int cast

This commit is contained in:
akallabeth
2025-01-07 09:42:21 +01:00
parent 5fb9f71b3b
commit c535d8d4a6
2 changed files with 6 additions and 2 deletions

View File

@@ -35,6 +35,8 @@
#include <sys/timerfd.h>
#include <sys/epoll.h>
#include <winpr/cast.h>
#include "uwac-os.h"
#include "wayland-cursor.h"
#include "wayland-client-protocol.h"
@@ -59,7 +61,7 @@ static struct wl_buffer* create_pointer_buffer(UwacSeat* seat, const void* src,
}
memcpy(data, src, size);
pool = wl_shm_create_pool(seat->display->shm, fd, size);
pool = wl_shm_create_pool(seat->display->shm, fd, WINPR_ASSERTING_INT_CAST(int32_t, size));
if (!pool)
{

View File

@@ -683,7 +683,9 @@ UwacReturnCode UwacWindowSetInputRegion(UwacWindow* window, uint32_t x, uint32_t
if (!window->input_region)
return UWAC_ERROR_NOMEMORY;
wl_region_add(window->input_region, x, y, width, height);
wl_region_add(window->input_region, WINPR_ASSERTING_INT_CAST(int32_t, x),
WINPR_ASSERTING_INT_CAST(int32_t, y), WINPR_ASSERTING_INT_CAST(int32_t, width),
WINPR_ASSERTING_INT_CAST(int32_t, height));
wl_surface_set_input_region(window->surface, window->input_region);
return UWAC_SUCCESS;
}