mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 00:14:11 +09:00
[uwac] fix narrowing int cast
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user