1From 761b4df04a141cc8c9507c741e4046c6c6b00491 Mon Sep 17 00:00:00 2001 2From: Wang Mingyu <wangmy@fujitsu.com> 3Date: Mon, 11 Sep 2023 09:00:39 +0000 4Subject: [PATCH] Fix const qualifier error 5 6Fixes clang error 7error: incompatible function pointer types assigning to 'OBJECT_NEW_FN' (aka 'void *(*)(void *)') from 'void *(const void *)' [-Wincompatible-function-pointer-types] 8| obj->fnObjectNew = uwac_event_clone; 9| ^ ~~~~~~~~~~~~~~~~ 10 11https://github.com/FreeRDP/FreeRDP/commit/6e3c00725aae99d03a0baa65430eceddebd9dee8 12Upstream-Status: Backport 13 14Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> 15--- 16 libfreerdp/codec/rfx.c | 4 ++-- 17 winpr/include/winpr/collections.h | 2 +- 18 2 files changed, 3 insertions(+), 3 deletions(-) 19 20diff --git a/libfreerdp/codec/rfx.c b/libfreerdp/codec/rfx.c 21index ccbc5af..eec7365 100644 22--- a/libfreerdp/codec/rfx.c 23+++ b/libfreerdp/codec/rfx.c 24@@ -153,7 +153,7 @@ static void rfx_tile_init(void* obj) 25 } 26 } 27 28-static void* rfx_decoder_tile_new(void* val) 29+static void* rfx_decoder_tile_new(const void* val) 30 { 31 RFX_TILE* tile = NULL; 32 WINPR_UNUSED(val); 33@@ -184,7 +184,7 @@ static void rfx_decoder_tile_free(void* obj) 34 } 35 } 36 37-static void* rfx_encoder_tile_new(void* val) 38+static void* rfx_encoder_tile_new(const void* val) 39 { 40 WINPR_UNUSED(val); 41 return calloc(1, sizeof(RFX_TILE)); 42diff --git a/winpr/include/winpr/collections.h b/winpr/include/winpr/collections.h 43index 807f011..b8c8d9d 100644 44--- a/winpr/include/winpr/collections.h 45+++ b/winpr/include/winpr/collections.h 46@@ -36,7 +36,7 @@ extern "C" 47 { 48 #endif 49 50- typedef void* (*OBJECT_NEW_FN)(void* val); 51+ typedef void* (*OBJECT_NEW_FN)(const void* val); 52 typedef void (*OBJECT_INIT_FN)(void* obj); 53 typedef void (*OBJECT_UNINIT_FN)(void* obj); 54 typedef void (*OBJECT_FREE_FN)(void* obj); 55-- 562.34.1 57 58