mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[channels] fix function pointer casts
* Cast freerdp_load_channel_addin_entry return with a union (removes the incompatible function pointer cast warnings) * Typedef function pointers in tables.h
This commit is contained in:
@@ -57,7 +57,7 @@ static void* freerdp_channels_find_static_entry_in_table(const STATIC_ENTRY_TABL
|
||||
union
|
||||
{
|
||||
void* pv;
|
||||
UINT (*entry)();
|
||||
static_entry_fn_t entry;
|
||||
} cnv;
|
||||
cnv.entry = pEntry->entry;
|
||||
return cnv.pv;
|
||||
|
||||
@@ -24,10 +24,11 @@
|
||||
WINPR_PRAGMA_DIAG_PUSH
|
||||
WINPR_PRAGMA_DIAG_IGNORED_STRICT_PROTOTYPES
|
||||
|
||||
typedef UINT (*static_entry_fn_t)();
|
||||
typedef struct
|
||||
{
|
||||
const char* name;
|
||||
UINT (*entry)();
|
||||
static_entry_fn_t entry;
|
||||
} STATIC_ENTRY;
|
||||
|
||||
typedef struct
|
||||
@@ -36,18 +37,20 @@ typedef struct
|
||||
const STATIC_ENTRY* table;
|
||||
} STATIC_ENTRY_TABLE;
|
||||
|
||||
typedef UINT (*static_subsystem_entry_fn_t)();
|
||||
typedef struct
|
||||
{
|
||||
const char* name;
|
||||
const char* type;
|
||||
UINT (*entry)();
|
||||
static_subsystem_entry_fn_t entry;
|
||||
} STATIC_SUBSYSTEM_ENTRY;
|
||||
|
||||
typedef UINT (*static_addin_entry_fn_t)();
|
||||
typedef struct
|
||||
{
|
||||
const char* name;
|
||||
const char* type;
|
||||
UINT (*entry)();
|
||||
static_addin_entry_fn_t entry;
|
||||
const STATIC_SUBSYSTEM_ENTRY* table;
|
||||
} STATIC_ADDIN_TABLE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user