Fixed #5713: Use proper types to generate tables.c where possible.

Use the correct type for function arguments of DVCPluginEntry type
and void* for type DeviceServiceEntry when generating tables.c
This commit is contained in:
Armin Novak 2019-11-12 11:04:11 +01:00
parent 8cf19fd94e
commit b3630d12e5
3 changed files with 8 additions and 3 deletions

View File

@ -43,6 +43,10 @@ foreach(STATIC_ENTRY ${CHANNEL_STATIC_CLIENT_ENTRIES})
set(ENTRY_POINT_IMPORT "extern BOOL VCAPITYPE ${ENTRY_POINT_NAME}(PCHANNEL_ENTRY_POINTS);") set(ENTRY_POINT_IMPORT "extern BOOL VCAPITYPE ${ENTRY_POINT_NAME}(PCHANNEL_ENTRY_POINTS);")
elseif(${${STATIC_MODULE}_CLIENT_ENTRY} STREQUAL "VirtualChannelEntryEx") elseif(${${STATIC_MODULE}_CLIENT_ENTRY} STREQUAL "VirtualChannelEntryEx")
set(ENTRY_POINT_IMPORT "extern BOOL VCAPITYPE ${ENTRY_POINT_NAME}(PCHANNEL_ENTRY_POINTS,PVOID);") set(ENTRY_POINT_IMPORT "extern BOOL VCAPITYPE ${ENTRY_POINT_NAME}(PCHANNEL_ENTRY_POINTS,PVOID);")
elseif(${${STATIC_MODULE}_CLIENT_ENTRY} MATCHES "DVCPluginEntry$")
set(ENTRY_POINT_IMPORT "extern UINT ${ENTRY_POINT_NAME}(IDRDYNVC_ENTRY_POINTS* pEntryPoints);")
elseif(${${STATIC_MODULE}_CLIENT_ENTRY} MATCHES "DeviceServiceEntry$")
set(ENTRY_POINT_IMPORT "extern UINT ${ENTRY_POINT_NAME}(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints);")
else() else()
set(ENTRY_POINT_IMPORT "extern UINT ${ENTRY_POINT_NAME}(void);") set(ENTRY_POINT_IMPORT "extern UINT ${ENTRY_POINT_NAME}(void);")
endif() endif()

View File

@ -46,7 +46,7 @@ extern const STATIC_ENTRY_TABLE CLIENT_STATIC_ENTRY_TABLES[];
void* freerdp_channels_find_static_entry_in_table(const STATIC_ENTRY_TABLE* table, void* freerdp_channels_find_static_entry_in_table(const STATIC_ENTRY_TABLE* table,
const char* identifier) const char* identifier)
{ {
int index = 0; size_t index = 0;
STATIC_ENTRY* pEntry; STATIC_ENTRY* pEntry;
pEntry = (STATIC_ENTRY*)&table->table[index++]; pEntry = (STATIC_ENTRY*)&table->table[index++];
@ -65,7 +65,7 @@ void* freerdp_channels_find_static_entry_in_table(const STATIC_ENTRY_TABLE* tabl
void* freerdp_channels_client_find_static_entry(const char* name, const char* identifier) void* freerdp_channels_client_find_static_entry(const char* name, const char* identifier)
{ {
int index = 0; size_t index = 0;
STATIC_ENTRY_TABLE* pEntry; STATIC_ENTRY_TABLE* pEntry;
pEntry = (STATIC_ENTRY_TABLE*)&CLIENT_STATIC_ENTRY_TABLES[index++]; pEntry = (STATIC_ENTRY_TABLE*)&CLIENT_STATIC_ENTRY_TABLES[index++];

View File

@ -19,6 +19,7 @@
* limitations under the License. * limitations under the License.
*/ */
#include <freerdp/channels/rdpdr.h>
#include "tables.h" #include "tables.h"
${CLIENT_STATIC_TYPEDEFS} ${CLIENT_STATIC_TYPEDEFS}