From 86acc8d31ac73e9526e370d27b410bce5d8f77f0 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Fri, 22 Sep 2023 14:51:43 +0200 Subject: [PATCH] [warnings] fixed reserved-identifer warnings --- client/common/client_cliprdr_file.c | 6 +-- include/freerdp/cache/persistent.h | 60 ++++++++++----------- include/freerdp/channels/telemetry.h | 5 +- include/freerdp/server/ainput.h | 4 +- include/freerdp/server/rdpecam-enumerator.h | 4 +- include/freerdp/server/telemetry.h | 4 +- libfreerdp/core/activation.h | 5 +- winpr/include/winpr/bcrypt.h | 2 +- winpr/libwinpr/pool/pool.h | 14 ++--- 9 files changed, 49 insertions(+), 55 deletions(-) diff --git a/client/common/client_cliprdr_file.c b/client/common/client_cliprdr_file.c index f9c7c8fa4..737a02678 100644 --- a/client/common/client_cliprdr_file.c +++ b/client/common/client_cliprdr_file.c @@ -71,7 +71,7 @@ #endif #if defined(WITH_FUSE2) || defined(WITH_FUSE3) -typedef enum _FuseLowlevelOperationType +typedef enum eFuseLowlevelOperationType { FUSE_LL_OPERATION_NONE, FUSE_LL_OPERATION_LOOKUP, @@ -79,9 +79,9 @@ typedef enum _FuseLowlevelOperationType FUSE_LL_OPERATION_READ, } FuseLowlevelOperationType; -typedef struct _CliprdrFuseFile CliprdrFuseFile; +typedef struct sCliprdrFuseFile CliprdrFuseFile; -struct _CliprdrFuseFile +struct sCliprdrFuseFile { CliprdrFuseFile* parent; wArrayList* children; diff --git a/include/freerdp/cache/persistent.h b/include/freerdp/cache/persistent.h index d0285911f..037875422 100644 --- a/include/freerdp/cache/persistent.h +++ b/include/freerdp/cache/persistent.h @@ -38,47 +38,43 @@ extern "C" /* 12 bytes */ -struct _PERSISTENT_CACHE_HEADER_V3 -{ - BYTE sig[8]; - UINT32 flags; /* 0x00000003, 0x00000006 */ -}; -typedef struct _PERSISTENT_CACHE_HEADER_V3 PERSISTENT_CACHE_HEADER_V3; + typedef struct + { + BYTE sig[8]; + UINT32 flags; /* 0x00000003, 0x00000006 */ + } PERSISTENT_CACHE_HEADER_V3; /* 12 bytes */ -struct _PERSISTENT_CACHE_ENTRY_V3 -{ - UINT64 key64; - UINT16 width; - UINT16 height; -}; -typedef struct _PERSISTENT_CACHE_ENTRY_V3 PERSISTENT_CACHE_ENTRY_V3; + typedef struct + { + UINT64 key64; + UINT16 width; + UINT16 height; + } PERSISTENT_CACHE_ENTRY_V3; /* 20 bytes */ -struct _PERSISTENT_CACHE_ENTRY_V2 -{ - UINT64 key64; - UINT16 width; - UINT16 height; - UINT32 size; - UINT32 flags; /* 0x00000011 */ -}; -typedef struct _PERSISTENT_CACHE_ENTRY_V2 PERSISTENT_CACHE_ENTRY_V2; + typedef struct + { + UINT64 key64; + UINT16 width; + UINT16 height; + UINT32 size; + UINT32 flags; /* 0x00000011 */ + } PERSISTENT_CACHE_ENTRY_V2; #pragma pack(pop) -struct _PERSISTENT_CACHE_ENTRY -{ - UINT64 key64; - UINT16 width; - UINT16 height; - UINT32 size; - UINT32 flags; - BYTE* data; -}; -typedef struct _PERSISTENT_CACHE_ENTRY PERSISTENT_CACHE_ENTRY; + typedef struct + { + UINT64 key64; + UINT16 width; + UINT16 height; + UINT32 size; + UINT32 flags; + BYTE* data; + } PERSISTENT_CACHE_ENTRY; FREERDP_API int persistent_cache_get_version(rdpPersistentCache* persistent); FREERDP_API int persistent_cache_get_count(rdpPersistentCache* persistent); diff --git a/include/freerdp/channels/telemetry.h b/include/freerdp/channels/telemetry.h index e92c3e0ec..b4764d949 100644 --- a/include/freerdp/channels/telemetry.h +++ b/include/freerdp/channels/telemetry.h @@ -31,14 +31,13 @@ extern "C" { #endif - struct _TELEMETRY_RDP_TELEMETRY_PDU + typedef struct { UINT32 PromptForCredentialsMillis; UINT32 PromptForCredentialsDoneMillis; UINT32 GraphicsChannelOpenedMillis; UINT32 FirstGraphicsReceivedMillis; - }; - typedef struct _TELEMETRY_RDP_TELEMETRY_PDU TELEMETRY_RDP_TELEMETRY_PDU; + } TELEMETRY_RDP_TELEMETRY_PDU; #ifdef __cplusplus } diff --git a/include/freerdp/server/ainput.h b/include/freerdp/server/ainput.h index b35b27d33..bb06c8418 100644 --- a/include/freerdp/server/ainput.h +++ b/include/freerdp/server/ainput.h @@ -37,7 +37,7 @@ extern "C" AINPUT_SERVER_OPEN_RESULT_ERROR = 3 } AINPUT_SERVER_OPEN_RESULT; - typedef struct _ainput_server_context ainput_server_context; + typedef struct s_ainput_server_context ainput_server_context; typedef BOOL (*psAInputChannelIdAssigned)(ainput_server_context* context, UINT32 channelId); @@ -54,7 +54,7 @@ extern "C" typedef UINT (*psAInputServerMouseEvent)(ainput_server_context* context, UINT64 timestamp, UINT64 flags, INT32 x, INT32 y); - struct _ainput_server_context + struct s_ainput_server_context { HANDLE vcm; diff --git a/include/freerdp/server/rdpecam-enumerator.h b/include/freerdp/server/rdpecam-enumerator.h index 77bf0b175..8e372b38a 100644 --- a/include/freerdp/server/rdpecam-enumerator.h +++ b/include/freerdp/server/rdpecam-enumerator.h @@ -28,7 +28,7 @@ extern "C" { #endif - typedef struct _cam_dev_enum_server_context CamDevEnumServerContext; + typedef struct s_cam_dev_enum_server_context CamDevEnumServerContext; typedef UINT (*psCamDevEnumServerServerOpen)(CamDevEnumServerContext* context); typedef UINT (*psCamDevEnumServerServerClose)(CamDevEnumServerContext* context); @@ -54,7 +54,7 @@ extern "C" CamDevEnumServerContext* context, const CAM_DEVICE_REMOVED_NOTIFICATION* deviceRemovedNotification); - struct _cam_dev_enum_server_context + struct s_cam_dev_enum_server_context { HANDLE vcm; diff --git a/include/freerdp/server/telemetry.h b/include/freerdp/server/telemetry.h index 033db1667..905965a0b 100644 --- a/include/freerdp/server/telemetry.h +++ b/include/freerdp/server/telemetry.h @@ -28,7 +28,7 @@ extern "C" { #endif - typedef struct _telemetry_server_context TelemetryServerContext; + typedef struct s_telemetry_server_context TelemetryServerContext; typedef UINT (*psTelemetryServerOpen)(TelemetryServerContext* context); typedef UINT (*psTelemetryServerClose)(TelemetryServerContext* context); @@ -44,7 +44,7 @@ extern "C" typedef UINT (*psTelemetryServerRdpTelemetry)(TelemetryServerContext* context, const TELEMETRY_RDP_TELEMETRY_PDU* rdpTelemetry); - struct _telemetry_server_context + struct s_telemetry_server_context { HANDLE vcm; diff --git a/libfreerdp/core/activation.h b/libfreerdp/core/activation.h index 4d7d95273..d979a5a7b 100644 --- a/libfreerdp/core/activation.h +++ b/libfreerdp/core/activation.h @@ -36,7 +36,7 @@ typedef enum CTRLACTION_COOPERATE = 0x0004 } CTRLACTION; -struct _RDP_BITMAP_PERSISTENT_INFO +typedef struct { UINT16 numEntriesCache0; UINT16 numEntriesCache1; @@ -50,8 +50,7 @@ struct _RDP_BITMAP_PERSISTENT_INFO UINT16 totalEntriesCache4; UINT32 keyCount; UINT64* keyList; -}; -typedef struct _RDP_BITMAP_PERSISTENT_INFO RDP_BITMAP_PERSISTENT_INFO; +} RDP_BITMAP_PERSISTENT_INFO; #define PERSIST_FIRST_PDU 0x01 #define PERSIST_LAST_PDU 0x02 diff --git a/winpr/include/winpr/bcrypt.h b/winpr/include/winpr/bcrypt.h index 40d4c7255..db36a1f02 100644 --- a/winpr/include/winpr/bcrypt.h +++ b/winpr/include/winpr/bcrypt.h @@ -271,7 +271,7 @@ typedef PVOID BCRYPT_SECRET_HANDLE; #define BCRYPT_KEY_DATA_BLOB_MAGIC 0x4d42444b #define BCRYPT_KEY_DATA_BLOB_VERSION1 0x1 -typedef struct _BCRYPT_KEY_DATA_BLOB_HEADER +typedef struct { ULONG dwMagic; ULONG dwVersion; diff --git a/winpr/libwinpr/pool/pool.h b/winpr/libwinpr/pool/pool.h index 9ecbb5453..7e8cf4cd9 100644 --- a/winpr/libwinpr/pool/pool.h +++ b/winpr/libwinpr/pool/pool.h @@ -28,12 +28,12 @@ #if defined(_WIN32) #if (_WIN32_WINNT < _WIN32_WINNT_WIN6) || defined(__MINGW32__) -struct _TP_CALLBACK_INSTANCE +struct S_TP_CALLBACK_INSTANCE { PTP_WORK Work; }; -struct _TP_POOL +struct S_TP_POOL { DWORD Minimum; DWORD Maximum; @@ -43,29 +43,29 @@ struct _TP_POOL wCountdownEvent* WorkComplete; }; -struct _TP_WORK +struct S_TP_WORK { PVOID CallbackParameter; PTP_WORK_CALLBACK WorkCallback; PTP_CALLBACK_ENVIRON CallbackEnvironment; }; -struct _TP_TIMER +struct S_TP_TIMER { void* dummy; }; -struct _TP_WAIT +struct S_TP_WAIT { void* dummy; }; -struct _TP_IO +struct S_TP_IO { void* dummy; }; -struct _TP_CLEANUP_GROUP +struct S_TP_CLEANUP_GROUP { void* dummy; };