diff --git a/channels/rdpecam/client/camera.h b/channels/rdpecam/client/camera.h index ce0be4e40..b94e11963 100644 --- a/channels/rdpecam/client/camera.h +++ b/channels/rdpecam/client/camera.h @@ -241,7 +241,7 @@ struct s_ICamHal CAM_ERROR_CODE (*Free)(ICamHal* ihal); }; -typedef WINPR_ATTR_NODISCARD UINT (*PREGISTERCAMERAHAL)(IWTSPlugin* plugin, ICamHal* hal); +typedef UINT (*PREGISTERCAMERAHAL)(IWTSPlugin* plugin, ICamHal* hal); typedef struct { @@ -255,8 +255,7 @@ typedef struct typedef FREERDP_CAMERA_HAL_ENTRY_POINTS* PFREERDP_CAMERA_HAL_ENTRY_POINTS; /* entry point called by addin manager */ -typedef WINPR_ATTR_NODISCARD -UINT(VCAPITYPE* PFREERDP_CAMERA_HAL_ENTRY)(PFREERDP_CAMERA_HAL_ENTRY_POINTS pEntryPoints); +typedef UINT(VCAPITYPE* PFREERDP_CAMERA_HAL_ENTRY)(PFREERDP_CAMERA_HAL_ENTRY_POINTS pEntryPoints); /* common functions */ UINT ecam_channel_send_generic_msg(CameraPlugin* ecam, GENERIC_CHANNEL_CALLBACK* hchannel, diff --git a/include/freerdp/autodetect.h b/include/freerdp/autodetect.h index a1090ab82..56ab0c296 100644 --- a/include/freerdp/autodetect.h +++ b/include/freerdp/autodetect.h @@ -120,22 +120,22 @@ extern "C" ALIGN64 wLog* log; /* 11 */ UINT64 paddingA[16 - 12]; /* 12 */ - ALIGN64 WINPR_ATTR_NODISCARD pRTTMeasureRequest RTTMeasureRequest; /* 16 */ - ALIGN64 WINPR_ATTR_NODISCARD pRTTMeasureResponse RTTMeasureResponse; /* 17 */ - ALIGN64 WINPR_ATTR_NODISCARD pBandwidthMeasureStart BandwidthMeasureStart; /* 18 */ - ALIGN64 WINPR_ATTR_NODISCARD pBandwidthMeasurePayload BandwidthMeasurePayload; /* 19 */ - ALIGN64 WINPR_ATTR_NODISCARD pBandwidthMeasureStop BandwidthMeasureStop; /* 20 */ - ALIGN64 WINPR_ATTR_NODISCARD pBandwidthMeasureResults BandwidthMeasureResults; /* 21 */ - ALIGN64 WINPR_ATTR_NODISCARD pNetworkCharacteristicsResult + WINPR_ATTR_NODISCARD ALIGN64 pRTTMeasureRequest RTTMeasureRequest; /* 16 */ + WINPR_ATTR_NODISCARD ALIGN64 pRTTMeasureResponse RTTMeasureResponse; /* 17 */ + WINPR_ATTR_NODISCARD ALIGN64 pBandwidthMeasureStart BandwidthMeasureStart; /* 18 */ + WINPR_ATTR_NODISCARD ALIGN64 pBandwidthMeasurePayload BandwidthMeasurePayload; /* 19 */ + WINPR_ATTR_NODISCARD ALIGN64 pBandwidthMeasureStop BandwidthMeasureStop; /* 20 */ + WINPR_ATTR_NODISCARD ALIGN64 pBandwidthMeasureResults BandwidthMeasureResults; /* 21 */ + WINPR_ATTR_NODISCARD ALIGN64 pNetworkCharacteristicsResult NetworkCharacteristicsResult; /* 22 */ - ALIGN64 WINPR_ATTR_NODISCARD pClientBandwidthMeasureResult + WINPR_ATTR_NODISCARD ALIGN64 pClientBandwidthMeasureResult ClientBandwidthMeasureResult; /* 23 */ - ALIGN64 WINPR_ATTR_NODISCARD pNetworkCharacteristicsSync + WINPR_ATTR_NODISCARD ALIGN64 pNetworkCharacteristicsSync NetworkCharacteristicsSync; /* 24 */ - ALIGN64 WINPR_ATTR_NODISCARD pRxTxReceived RequestReceived; /* 25 */ - ALIGN64 WINPR_ATTR_NODISCARD pRxTxReceived ResponseReceived; /* 26 */ - ALIGN64 WINPR_ATTR_NODISCARD pOnConnectTimeAutoDetect OnConnectTimeAutoDetectBegin; /* 27 */ - ALIGN64 WINPR_ATTR_NODISCARD pOnConnectTimeAutoDetect + WINPR_ATTR_NODISCARD ALIGN64 pRxTxReceived RequestReceived; /* 25 */ + WINPR_ATTR_NODISCARD ALIGN64 pRxTxReceived ResponseReceived; /* 26 */ + WINPR_ATTR_NODISCARD ALIGN64 pOnConnectTimeAutoDetect OnConnectTimeAutoDetectBegin; /* 27 */ + WINPR_ATTR_NODISCARD ALIGN64 pOnConnectTimeAutoDetect OnConnectTimeAutoDetectProgress; /* 28 */ UINT64 paddingB[32 - 29]; /* 29 */ }; diff --git a/include/freerdp/dvc.h b/include/freerdp/dvc.h index f8047b87e..d40692fdd 100644 --- a/include/freerdp/dvc.h +++ b/include/freerdp/dvc.h @@ -171,7 +171,7 @@ extern "C" WINPR_ATTR_NODISCARD rdpContext* (*GetRdpContext)(IDRDYNVC_ENTRY_POINTS* pEntryPoints); }; - typedef WINPR_ATTR_NODISCARD UINT(VCAPITYPE* PDVC_PLUGIN_ENTRY)(IDRDYNVC_ENTRY_POINTS*); + typedef UINT(VCAPITYPE* PDVC_PLUGIN_ENTRY)(IDRDYNVC_ENTRY_POINTS*); WINPR_ATTR_NODISCARD FREERDP_API void* get_callback_by_name(const char* name, void** context); diff --git a/include/freerdp/extension.h b/include/freerdp/extension.h index f6976fd7d..f20f1d16c 100644 --- a/include/freerdp/extension.h +++ b/include/freerdp/extension.h @@ -39,15 +39,13 @@ extern "C" WINPR_ATTR_NODISCARD int (*uninit)(rdpExtPlugin* plugin, freerdp* instance); }; - typedef WINPR_ATTR_NODISCARD UINT32(FREERDP_CC* PFREERDP_EXTENSION_HOOK)(rdpExtPlugin* plugin, - freerdp* instance); + typedef UINT32(FREERDP_CC* PFREERDP_EXTENSION_HOOK)(rdpExtPlugin* plugin, freerdp* instance); - typedef WINPR_ATTR_NODISCARD UINT32(FREERDP_CC* PREGISTEREXTENSION)(rdpExtPlugin* plugin); - typedef WINPR_ATTR_NODISCARD - UINT32(FREERDP_CC* PREGISTERPRECONNECTHOOK)(rdpExtPlugin* plugin, PFREERDP_EXTENSION_HOOK hook); - typedef WINPR_ATTR_NODISCARD - UINT32(FREERDP_CC* PREGISTERPOSTCONNECTHOOK)(rdpExtPlugin* plugin, - PFREERDP_EXTENSION_HOOK hook); + typedef UINT32(FREERDP_CC* PREGISTEREXTENSION)(rdpExtPlugin* plugin); + typedef UINT32(FREERDP_CC* PREGISTERPRECONNECTHOOK)(rdpExtPlugin* plugin, + PFREERDP_EXTENSION_HOOK hook); + typedef UINT32(FREERDP_CC* PREGISTERPOSTCONNECTHOOK)(rdpExtPlugin* plugin, + PFREERDP_EXTENSION_HOOK hook); typedef struct { @@ -59,8 +57,7 @@ extern "C" } FREERDP_EXTENSION_ENTRY_POINTS; typedef FREERDP_EXTENSION_ENTRY_POINTS* PFREERDP_EXTENSION_ENTRY_POINTS; - typedef WINPR_ATTR_NODISCARD int(FREERDP_CC* PFREERDP_EXTENSION_ENTRY)( - PFREERDP_EXTENSION_ENTRY_POINTS pEntryPoints); + typedef int(FREERDP_CC* PFREERDP_EXTENSION_ENTRY)(PFREERDP_EXTENSION_ENTRY_POINTS pEntryPoints); #ifdef __cplusplus } diff --git a/include/freerdp/freerdp.h b/include/freerdp/freerdp.h index c030a0c69..db022cbb4 100644 --- a/include/freerdp/freerdp.h +++ b/include/freerdp/freerdp.h @@ -477,7 +477,7 @@ owned by rdpRdp */ additional information after that. */ - ALIGN64 WINPR_ATTR_NODISCARD pContextNew + WINPR_ATTR_NODISCARD ALIGN64 pContextNew ContextNew; /**< (offset 33) Callback for context allocation Can be set before calling freerdp_context_new() to have it executed after @@ -492,37 +492,37 @@ owned by rdpRdp */ ALIGN64 UINT ConnectionCallbackState; /* 47 */ - ALIGN64 WINPR_ATTR_NODISCARD pConnectCallback + WINPR_ATTR_NODISCARD ALIGN64 pConnectCallback PreConnect; /**< (offset 48) Callback for pre-connect operations. Can be set before calling freerdp_connect() to have it executed before the actual connection happens. Must be set to NULL if not needed. */ - ALIGN64 WINPR_ATTR_NODISCARD pConnectCallback + WINPR_ATTR_NODISCARD ALIGN64 pConnectCallback PostConnect; /**< (offset 49) Callback for post-connect operations. Can be set before calling freerdp_connect() to have it executed after the actual connection has succeeded. Must be set to NULL if not needed. */ - ALIGN64 WINPR_ATTR_NODISCARD pAuthenticate Authenticate; /**< (offset 50) + WINPR_ATTR_NODISCARD ALIGN64 pAuthenticate Authenticate; /**< (offset 50) Callback for authentication. It is used to get the username/password when it was not provided at connection time. */ #if defined(WITH_FREERDP_DEPRECATED) WINPR_DEPRECATED_VAR("Use VerifyCertificateEx or VerifyX509Certificate instead", - ALIGN64 WINPR_ATTR_NODISCARD pVerifyCertificate + WINPR_ATTR_NODISCARD ALIGN64 pVerifyCertificate VerifyCertificate;) /**< (offset 51) */ WINPR_DEPRECATED_VAR("Use VerifyChangedCertificateEx or VerifyX509Certificate instead", - ALIGN64 WINPR_ATTR_NODISCARD pVerifyChangedCertificate + WINPR_ATTR_NODISCARD ALIGN64 pVerifyChangedCertificate VerifyChangedCertificate;) /**< (offset 52) */ #else ALIGN64 UINT64 reserved[2]; #endif - ALIGN64 WINPR_ATTR_NODISCARD pVerifyX509Certificate + WINPR_ATTR_NODISCARD ALIGN64 pVerifyX509Certificate VerifyX509Certificate; /**< (offset 53) Callback for X509 certificate verification (PEM format) */ - ALIGN64 WINPR_ATTR_NODISCARD pLogonErrorInfo + WINPR_ATTR_NODISCARD ALIGN64 pLogonErrorInfo LogonErrorInfo; /**< (offset 54) Callback for logon error info, important for logon system messages with RemoteApp */ @@ -535,22 +535,22 @@ owned by rdpRdp */ channels. */ - ALIGN64 WINPR_ATTR_NODISCARD pAuthenticate GatewayAuthenticate; /**< (offset 56) + WINPR_ATTR_NODISCARD ALIGN64 pAuthenticate GatewayAuthenticate; /**< (offset 56) Callback for gateway authentication. It is used to get the username/password when it was not provided at connection time. */ - ALIGN64 WINPR_ATTR_NODISCARD pPresentGatewayMessage PresentGatewayMessage; /**< (offset 57) + WINPR_ATTR_NODISCARD ALIGN64 pPresentGatewayMessage PresentGatewayMessage; /**< (offset 57) Callback for gateway consent messages. It is used to present consent messages to the user. */ - ALIGN64 WINPR_ATTR_NODISCARD pConnectCallback Redirect; /**< (offset 58) + WINPR_ATTR_NODISCARD ALIGN64 pConnectCallback Redirect; /**< (offset 58) Callback for redirect operations. Can be set after rdp_client_disconnect_and_clear and applying redirection settings but before rdp_client_connect() to have it executed after the actual connection has succeeded. Must be set to NULL if not needed. */ - ALIGN64 WINPR_ATTR_NODISCARD pConnectCallback + WINPR_ATTR_NODISCARD ALIGN64 pConnectCallback LoadChannels; /**< (offset 59) * callback for loading channel configuration. Might be called multiple * times when redirection occurs. */ @@ -564,45 +564,45 @@ owned by rdpRdp */ */ UINT64 paddingD[64 - 61]; /* 61 */ - ALIGN64 WINPR_ATTR_NODISCARD pSendChannelData + WINPR_ATTR_NODISCARD ALIGN64 pSendChannelData SendChannelData; /* (offset 64) Callback for sending data to a channel. By default, it is set by freerdp_new() to freerdp_send_channel_data(), which eventually calls freerdp_channel_send() */ - ALIGN64 WINPR_ATTR_NODISCARD pReceiveChannelData + WINPR_ATTR_NODISCARD ALIGN64 pReceiveChannelData ReceiveChannelData; /* (offset 65) Callback for receiving data from a channel. This is called by freerdp_channel_process() (if not NULL). Clients will typically use a function that calls freerdp_channels_data() to perform the needed tasks. */ - ALIGN64 WINPR_ATTR_NODISCARD pVerifyCertificateEx + WINPR_ATTR_NODISCARD ALIGN64 pVerifyCertificateEx VerifyCertificateEx; /**< (offset 66) Callback for certificate validation. Used to verify that an unknown certificate is trusted. */ - ALIGN64 WINPR_ATTR_NODISCARD pVerifyChangedCertificateEx + WINPR_ATTR_NODISCARD ALIGN64 pVerifyChangedCertificateEx VerifyChangedCertificateEx; /**< (offset 67) Callback for changed certificate validation. Used when a certificate differs from stored fingerprint. */ - ALIGN64 WINPR_ATTR_NODISCARD pSendChannelPacket + WINPR_ATTR_NODISCARD ALIGN64 pSendChannelPacket SendChannelPacket; /* (offset 68) * Callback for sending RAW data to a channel. In contrast to * SendChannelData data fragmentation is up to the user and this * function sends data as is with the provided flags. */ - ALIGN64 WINPR_ATTR_NODISCARD pAuthenticateEx AuthenticateEx; /**< (offset 69) + WINPR_ATTR_NODISCARD ALIGN64 pAuthenticateEx AuthenticateEx; /**< (offset 69) Callback for authentication. It is used to get the username/password. The reason argument tells why it was called. */ - ALIGN64 WINPR_ATTR_NODISCARD pChooseSmartcard + WINPR_ATTR_NODISCARD ALIGN64 pChooseSmartcard ChooseSmartcard; /* (offset 70) Callback for choosing a smartcard for logon. Used when multiple smartcards are available. Returns an index into a list of SmartcardCertInfo pointers */ - ALIGN64 WINPR_ATTR_NODISCARD pGetAccessToken GetAccessToken; /* (offset 71) + WINPR_ATTR_NODISCARD ALIGN64 pGetAccessToken GetAccessToken; /* (offset 71) Callback for obtaining an access token for \b AccessTokenType authentication */ - ALIGN64 WINPR_ATTR_NODISCARD pRetryDialog + WINPR_ATTR_NODISCARD ALIGN64 pRetryDialog RetryDialog; /* (offset 72) Callback for displaying a dialog in case of something needs a retry */ UINT64 paddingE[80 - 73]; /* 73 */ diff --git a/include/freerdp/peer.h b/include/freerdp/peer.h index 2dee3465a..6144e70cb 100644 --- a/include/freerdp/peer.h +++ b/include/freerdp/peer.h @@ -140,39 +140,39 @@ extern "C" ALIGN64 void* ContextExtra; ALIGN64 size_t ContextSize; - ALIGN64 WINPR_ATTR_NODISCARD psPeerContextNew ContextNew; + WINPR_ATTR_NODISCARD ALIGN64 psPeerContextNew ContextNew; ALIGN64 psPeerContextFree ContextFree; - ALIGN64 WINPR_ATTR_NODISCARD psPeerInitialize Initialize; + WINPR_ATTR_NODISCARD ALIGN64 psPeerInitialize Initialize; #if defined(WITH_FREERDP_DEPRECATED) WINPR_DEPRECATED_VAR("Use freerdp_peer::GetEventHandle instead", - ALIGN64 WINPR_ATTR_NODISCARD psPeerGetFileDescriptor + WINPR_ATTR_NODISCARD ALIGN64 psPeerGetFileDescriptor GetFileDescriptor;) #else UINT64 reserved; #endif - ALIGN64 WINPR_ATTR_NODISCARD psPeerGetEventHandle GetEventHandle; - ALIGN64 WINPR_ATTR_NODISCARD psPeerGetReceiveEventHandle GetReceiveEventHandle; - ALIGN64 WINPR_ATTR_NODISCARD psPeerCheckFileDescriptor CheckFileDescriptor; + WINPR_ATTR_NODISCARD ALIGN64 psPeerGetEventHandle GetEventHandle; + WINPR_ATTR_NODISCARD ALIGN64 psPeerGetReceiveEventHandle GetReceiveEventHandle; + WINPR_ATTR_NODISCARD ALIGN64 psPeerCheckFileDescriptor CheckFileDescriptor; ALIGN64 psPeerClose Close; ALIGN64 psPeerDisconnect Disconnect; - ALIGN64 WINPR_ATTR_NODISCARD psPeerCapabilities Capabilities; - ALIGN64 WINPR_ATTR_NODISCARD psPeerPostConnect PostConnect; - ALIGN64 WINPR_ATTR_NODISCARD psPeerActivate Activate; - ALIGN64 WINPR_ATTR_NODISCARD psPeerLogon Logon; + WINPR_ATTR_NODISCARD ALIGN64 psPeerCapabilities Capabilities; + WINPR_ATTR_NODISCARD ALIGN64 psPeerPostConnect PostConnect; + WINPR_ATTR_NODISCARD ALIGN64 psPeerActivate Activate; + WINPR_ATTR_NODISCARD ALIGN64 psPeerLogon Logon; - ALIGN64 WINPR_ATTR_NODISCARD psPeerSendServerRedirection SendServerRedirection; + WINPR_ATTR_NODISCARD ALIGN64 psPeerSendServerRedirection SendServerRedirection; - ALIGN64 WINPR_ATTR_NODISCARD psPeerSendChannelData SendChannelData; - ALIGN64 WINPR_ATTR_NODISCARD psPeerReceiveChannelData ReceiveChannelData; + WINPR_ATTR_NODISCARD ALIGN64 psPeerSendChannelData SendChannelData; + WINPR_ATTR_NODISCARD ALIGN64 psPeerReceiveChannelData ReceiveChannelData; - ALIGN64 WINPR_ATTR_NODISCARD psPeerVirtualChannelOpen VirtualChannelOpen; - ALIGN64 WINPR_ATTR_NODISCARD psPeerVirtualChannelClose VirtualChannelClose; - ALIGN64 WINPR_ATTR_NODISCARD psPeerVirtualChannelRead VirtualChannelRead; - ALIGN64 WINPR_ATTR_NODISCARD psPeerVirtualChannelWrite VirtualChannelWrite; - ALIGN64 WINPR_ATTR_NODISCARD psPeerVirtualChannelGetData VirtualChannelGetData; - ALIGN64 WINPR_ATTR_NODISCARD psPeerVirtualChannelSetData VirtualChannelSetData; + WINPR_ATTR_NODISCARD ALIGN64 psPeerVirtualChannelOpen VirtualChannelOpen; + WINPR_ATTR_NODISCARD ALIGN64 psPeerVirtualChannelClose VirtualChannelClose; + WINPR_ATTR_NODISCARD ALIGN64 psPeerVirtualChannelRead VirtualChannelRead; + WINPR_ATTR_NODISCARD ALIGN64 psPeerVirtualChannelWrite VirtualChannelWrite; + WINPR_ATTR_NODISCARD ALIGN64 psPeerVirtualChannelGetData VirtualChannelGetData; + WINPR_ATTR_NODISCARD ALIGN64 psPeerVirtualChannelSetData VirtualChannelSetData; ALIGN64 int pId; ALIGN64 UINT32 ack_frame_id; @@ -182,21 +182,21 @@ extern "C" ALIGN64 BOOL authenticated; ALIGN64 SEC_WINNT_AUTH_IDENTITY identity; - ALIGN64 WINPR_ATTR_NODISCARD psPeerIsWriteBlocked IsWriteBlocked; - ALIGN64 WINPR_ATTR_NODISCARD psPeerDrainOutputBuffer DrainOutputBuffer; - ALIGN64 WINPR_ATTR_NODISCARD psPeerHasMoreToRead HasMoreToRead; - ALIGN64 WINPR_ATTR_NODISCARD psPeerGetEventHandles GetEventHandles; - ALIGN64 WINPR_ATTR_NODISCARD psPeerAdjustMonitorsLayout AdjustMonitorsLayout; - ALIGN64 WINPR_ATTR_NODISCARD psPeerClientCapabilities ClientCapabilities; + WINPR_ATTR_NODISCARD ALIGN64 psPeerIsWriteBlocked IsWriteBlocked; + WINPR_ATTR_NODISCARD ALIGN64 psPeerDrainOutputBuffer DrainOutputBuffer; + WINPR_ATTR_NODISCARD ALIGN64 psPeerHasMoreToRead HasMoreToRead; + WINPR_ATTR_NODISCARD ALIGN64 psPeerGetEventHandles GetEventHandles; + WINPR_ATTR_NODISCARD ALIGN64 psPeerAdjustMonitorsLayout AdjustMonitorsLayout; + WINPR_ATTR_NODISCARD ALIGN64 psPeerClientCapabilities ClientCapabilities; #if defined(WITH_FREERDP_DEPRECATED) WINPR_DEPRECATED_VAR("Use freerdp_peer::SspiNtlmHashCallback instead", - ALIGN64 WINPR_ATTR_NODISCARD psPeerComputeNtlmHash ComputeNtlmHash;) + WINPR_ATTR_NODISCARD ALIGN64 psPeerComputeNtlmHash ComputeNtlmHash;) #else UINT64 reserved2; #endif - ALIGN64 WINPR_ATTR_NODISCARD psPeerLicenseCallback LicenseCallback; + WINPR_ATTR_NODISCARD ALIGN64 psPeerLicenseCallback LicenseCallback; - ALIGN64 WINPR_ATTR_NODISCARD psPeerSendChannelPacket SendChannelPacket; + WINPR_ATTR_NODISCARD ALIGN64 psPeerSendChannelPacket SendChannelPacket; /** * @brief SetState Function pointer allowing to manually set the state of the @@ -208,15 +208,15 @@ extern "C" * * \note Must be called after \b Initialize as that also modifies the state. */ - ALIGN64 WINPR_ATTR_NODISCARD psPeerSetState SetState; - ALIGN64 WINPR_ATTR_NODISCARD psPeerReachedState ReachedState; - ALIGN64 WINPR_ATTR_NODISCARD psSspiNtlmHashCallback SspiNtlmHashCallback; + WINPR_ATTR_NODISCARD ALIGN64 psPeerSetState SetState; + WINPR_ATTR_NODISCARD ALIGN64 psPeerReachedState ReachedState; + WINPR_ATTR_NODISCARD ALIGN64 psSspiNtlmHashCallback SspiNtlmHashCallback; /** * @brief RemoteCredentials Function pointer that will be called when remote * credentials guard are used by the peer and we receive the logonCreds (kerberos) * and supplementary creds (NTLM). */ - ALIGN64 WINPR_ATTR_NODISCARD psPeerRemoteCredentials RemoteCredentials; + WINPR_ATTR_NODISCARD ALIGN64 psPeerRemoteCredentials RemoteCredentials; }; FREERDP_API void freerdp_peer_context_free(freerdp_peer* client); diff --git a/include/freerdp/server/proxy/proxy_modules_api.h b/include/freerdp/server/proxy/proxy_modules_api.h index 011ab931c..0cb550815 100644 --- a/include/freerdp/server/proxy/proxy_modules_api.h +++ b/include/freerdp/server/proxy/proxy_modules_api.h @@ -153,8 +153,7 @@ extern "C" UINT64 reserved[128 - 4]; /* 4-127 reserved fields */ }; - typedef WINPR_ATTR_NODISCARD BOOL (*proxyModuleEntryPoint)(proxyPluginsManager* plugins_manager, - void* userdata); + typedef BOOL (*proxyModuleEntryPoint)(proxyPluginsManager* plugins_manager, void* userdata); /* filter events parameters */ #define WINPR_PACK_PUSH diff --git a/include/freerdp/transport_io.h b/include/freerdp/transport_io.h index 9eb19856b..480047f01 100644 --- a/include/freerdp/transport_io.h +++ b/include/freerdp/transport_io.h @@ -68,11 +68,11 @@ extern "C" typedef struct { ALIGN64 void* userContext; - ALIGN64 WINPR_ATTR_NODISCARD pTransportLayerRead Read; - ALIGN64 WINPR_ATTR_NODISCARD pTransportLayerWrite Write; + WINPR_ATTR_NODISCARD ALIGN64 pTransportLayerRead Read; + WINPR_ATTR_NODISCARD ALIGN64 pTransportLayerWrite Write; ALIGN64 pTransportLayerFkt Close; - ALIGN64 WINPR_ATTR_NODISCARD pTransportLayerWait Wait; - ALIGN64 WINPR_ATTR_NODISCARD pTransportLayerGetEvent GetEvent; + WINPR_ATTR_NODISCARD ALIGN64 pTransportLayerWait Wait; + WINPR_ATTR_NODISCARD ALIGN64 pTransportLayerGetEvent GetEvent; UINT64 reserved[64 - 6]; /* Reserve some space for ABI compatibility */ } rdpTransportLayer; diff --git a/libfreerdp/utils/helpers.c b/libfreerdp/utils/helpers.c index aff3ab3a0..122061869 100644 --- a/libfreerdp/utils/helpers.c +++ b/libfreerdp/utils/helpers.c @@ -88,7 +88,8 @@ static BOOL CALLBACK init_app_details(WINPR_ATTR_UNUSED PINIT_ONCE once, return TRUE; } -static WINPR_ATTR_NODISCARD BOOL initializeApplicationDetails(void) +WINPR_ATTR_NODISCARD +static BOOL initializeApplicationDetails(void) { InitOnceExecuteOnce(&s_freerdp_app_details_once, init_app_details, NULL, NULL); return TRUE; diff --git a/server/shadow/shadow_client.c b/server/shadow/shadow_client.c index 281f7984e..444e4db71 100644 --- a/server/shadow/shadow_client.c +++ b/server/shadow/shadow_client.c @@ -109,7 +109,8 @@ static BOOL BitmapUpdateProxyEx(rdpShadowClient* client, const BITMAP_UPDATE* bi return TRUE; } -static inline WINPR_ATTR_NODISCARD BOOL shadow_client_rdpgfx_new_surface(rdpShadowClient* client) +WINPR_ATTR_NODISCARD +static inline BOOL shadow_client_rdpgfx_new_surface(rdpShadowClient* client) { UINT error = CHANNEL_RC_OK; RDPGFX_CREATE_SURFACE_PDU createSurface; @@ -152,8 +153,8 @@ static inline WINPR_ATTR_NODISCARD BOOL shadow_client_rdpgfx_new_surface(rdpShad return TRUE; } -static inline WINPR_ATTR_NODISCARD BOOL -shadow_client_rdpgfx_release_surface(rdpShadowClient* client) +WINPR_ATTR_NODISCARD +static inline BOOL shadow_client_rdpgfx_release_surface(rdpShadowClient* client) { UINT error = CHANNEL_RC_OK; RDPGFX_DELETE_SURFACE_PDU pdu; @@ -176,7 +177,8 @@ shadow_client_rdpgfx_release_surface(rdpShadowClient* client) return TRUE; } -static inline WINPR_ATTR_NODISCARD BOOL shadow_client_rdpgfx_reset_graphic(rdpShadowClient* client) +WINPR_ATTR_NODISCARD +static inline BOOL shadow_client_rdpgfx_reset_graphic(rdpShadowClient* client) { UINT error = CHANNEL_RC_OK; RDPGFX_RESET_GRAPHICS_PDU pdu = { 0 }; @@ -389,7 +391,8 @@ fail: * * @return TRUE if width/height changed. */ -static inline WINPR_ATTR_NODISCARD BOOL shadow_client_recalc_desktop_size(rdpShadowClient* client) +WINPR_ATTR_NODISCARD +static inline BOOL shadow_client_recalc_desktop_size(rdpShadowClient* client) { INT32 width = 0; INT32 height = 0; @@ -1147,8 +1150,8 @@ static UINT shadow_client_rdpgfx_caps_advertise(RdpgfxServerContext* context, return CHANNEL_RC_UNSUPPORTED_VERSION; } -static inline WINPR_ATTR_NODISCARD UINT32 -rdpgfx_estimate_h264_avc420(RDPGFX_AVC420_BITMAP_STREAM* havc420) +WINPR_ATTR_NODISCARD +static inline UINT32 rdpgfx_estimate_h264_avc420(RDPGFX_AVC420_BITMAP_STREAM* havc420) { /* H264 metadata + H264 stream. See rdpgfx_write_h264_avc420 */ WINPR_ASSERT(havc420); @@ -2146,8 +2149,8 @@ static BOOL shadow_client_surface_update(rdpShadowClient* client, REGION16* regi * @return TRUE on success */ WINPR_ATTR_NODISCARD -static inline WINPR_ATTR_NODISCARD BOOL shadow_client_no_surface_update(rdpShadowClient* client, - SHADOW_GFX_STATUS* pStatus) +static inline BOOL shadow_client_no_surface_update(rdpShadowClient* client, + SHADOW_GFX_STATUS* pStatus) { rdpShadowServer* server = NULL; rdpShadowSurface* surface = NULL; diff --git a/winpr/libwinpr/utils/winpr.c b/winpr/libwinpr/utils/winpr.c index fcb4bde2c..269bbe769 100644 --- a/winpr/libwinpr/utils/winpr.c +++ b/winpr/libwinpr/utils/winpr.c @@ -64,7 +64,8 @@ static BOOL CALLBACK init_app_details(WINPR_ATTR_UNUSED PINIT_ONCE once, return TRUE; } -static WINPR_ATTR_NODISCARD BOOL initializeApplicationDetails(void) +WINPR_ATTR_NODISCARD +static BOOL initializeApplicationDetails(void) { InitOnceExecuteOnce(&s_winpr_app_details_once, init_app_details, NULL, NULL); return TRUE;