mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[winpr] add WINPR_C_ARRAY_INIT
since C23 allows c++ style initializing replace direct use with this macro
This commit is contained in:
@@ -341,7 +341,7 @@ static UINT wlf_cliprdr_send_data_request(wfClipboard* clipboard, const wlf_cons
|
||||
*/
|
||||
static UINT wlf_cliprdr_send_data_response(wfClipboard* clipboard, const BYTE* data, size_t size)
|
||||
{
|
||||
CLIPRDR_FORMAT_DATA_RESPONSE response = { 0 };
|
||||
CLIPRDR_FORMAT_DATA_RESPONSE response = WINPR_C_ARRAY_INIT;
|
||||
|
||||
if (size > UINT32_MAX)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
@@ -530,7 +530,7 @@ static void wlf_cliprdr_transfer_data(UwacSeat* seat, void* context, const char*
|
||||
|
||||
EnterCriticalSection(&clipboard->lock);
|
||||
|
||||
wlf_const_request request = { 0 };
|
||||
wlf_const_request request = WINPR_C_ARRAY_INIT;
|
||||
if (wlf_mime_is_html(mime))
|
||||
{
|
||||
request.responseMime = mime_html;
|
||||
|
||||
@@ -150,7 +150,7 @@ static BOOL wlf_Pointer_SetPosition(WINPR_ATTR_UNUSED rdpContext* context,
|
||||
|
||||
BOOL wlf_register_pointer(rdpGraphics* graphics)
|
||||
{
|
||||
rdpPointer pointer = { 0 };
|
||||
rdpPointer pointer = WINPR_C_ARRAY_INIT;
|
||||
|
||||
pointer.size = sizeof(wlfPointer);
|
||||
pointer.New = wlf_Pointer_New;
|
||||
|
||||
@@ -53,10 +53,10 @@ static BOOL wl_update_buffer(wlfContext* context_w, INT32 ix, INT32 iy, INT32 iw
|
||||
BOOL res = FALSE;
|
||||
rdpGdi* gdi = NULL;
|
||||
char* data = NULL;
|
||||
UwacSize geometry = { 0 };
|
||||
UwacSize geometry = WINPR_C_ARRAY_INIT;
|
||||
size_t stride = 0;
|
||||
UwacReturnCode rc = UWAC_ERROR_INTERNAL;
|
||||
RECTANGLE_16 area = { 0 };
|
||||
RECTANGLE_16 area = WINPR_C_ARRAY_INIT;
|
||||
|
||||
if (!context_w)
|
||||
return FALSE;
|
||||
@@ -474,7 +474,7 @@ static BOOL handle_window_events(freerdp* instance)
|
||||
static int wlfreerdp_run(freerdp* instance)
|
||||
{
|
||||
wlfContext* context = NULL;
|
||||
HANDLE handles[MAXIMUM_WAIT_OBJECTS] = { 0 };
|
||||
HANDLE handles[MAXIMUM_WAIT_OBJECTS] = WINPR_C_ARRAY_INIT;
|
||||
DWORD status = WAIT_ABANDONED;
|
||||
|
||||
if (!instance)
|
||||
@@ -754,7 +754,7 @@ BOOL wlf_copy_image(const void* src, size_t srcStride, size_t srcWidth, size_t s
|
||||
BOOL wlf_scale_coordinates(rdpContext* context, UINT32* px, UINT32* py, BOOL fromLocalToRDP)
|
||||
{
|
||||
wlfContext* wlf = (wlfContext*)context;
|
||||
UwacSize geometry = { 0 };
|
||||
UwacSize geometry = WINPR_C_ARRAY_INIT;
|
||||
|
||||
if (!context || !px || !py || !context->gdi)
|
||||
return FALSE;
|
||||
|
||||
Reference in New Issue
Block a user