reverted changes from clang-format

This commit is contained in:
sss 2021-02-24 15:53:43 +03:00 committed by akallabeth
parent bee2e1526d
commit 6574fdf6e4
34 changed files with 97 additions and 154 deletions

View File

@ -941,8 +941,7 @@ error_out:
static rdpPrinterDriver* printer_load_backend(const char* backend)
{
typedef rdpPrinterDriver* (*backend_load_t)(void);
union
{
union {
PVIRTUALCHANNELENTRY entry;
backend_load_t backend;
} fktconv;

View File

@ -183,8 +183,7 @@ UINT devman_load_device_service(DEVMAN* devman, const RDPDR_DEVICE* device, rdpC
const char* ServiceName = NULL;
DEVICE_SERVICE_ENTRY_POINTS ep;
PDEVICE_SERVICE_ENTRY entry = NULL;
union
{
union {
const RDPDR_DEVICE* cdp;
RDPDR_DEVICE* dp;
} devconv;

View File

@ -257,8 +257,7 @@ static BOOL rdpsnd_opensles_set_volume(rdpsndDevicePlugin* device, UINT32 value)
static UINT rdpsnd_opensles_play(rdpsndDevicePlugin* device, const BYTE* data, size_t size)
{
union
{
union {
const BYTE* b;
const short* s;
} src;

View File

@ -95,6 +95,7 @@ static UINT rdpsnd_proxy_play(rdpsndDevicePlugin* device, const BYTE* data, size
return GetTickCount() - start;
}
/**
* Function description
*

View File

@ -145,7 +145,7 @@ static UINT serial_process_irp_create(SERIAL_DEVICE* serial, IRP* irp)
if (!Stream_SafeSeek(irp->input, PathLength)) /* Path (variable) */
return ERROR_INVALID_DATA;
assert(PathLength == 0); /* MS-RDPESP 2.2.2.2 */
assert(PathLength == 0); /* MS-RDPESP 2.2.2.2 */
#ifndef _WIN32
/* Windows 2012 server sends on a first call :
* DesiredAccess = 0x00100080: SYNCHRONIZE | FILE_READ_ATTRIBUTES

View File

@ -699,14 +699,12 @@ static LONG smartcard_ListReadersW_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_O
DWORD cchReaders = 0;
IRP* irp = operation->irp;
ListReaders_Call* call = &operation->call.listReaders;
union
{
union {
const BYTE* bp;
const char* sz;
const WCHAR* wz;
} string;
union
{
union {
WCHAR** ppw;
WCHAR* pw;
CHAR* pc;

View File

@ -517,6 +517,7 @@ static LIBUSB_DEVICE_DESCRIPTOR* udev_new_descript(URBDRC_PLUGIN* urbdrc, LIBUSB
return descriptor;
}
static int libusb_udev_select_interface(IUDEVICE* idev, BYTE InterfaceNumber, BYTE AlternateSetting)
{
int error = 0, diff = 0;

View File

@ -434,8 +434,7 @@ static void xf_input_touch_end(xfContext* xfc, XIDeviceEvent* event)
static int xf_input_handle_event_local(xfContext* xfc, const XEvent* event)
{
union
{
union {
const XGenericEventCookie* cc;
XGenericEventCookie* vc;
} cookie;
@ -609,8 +608,7 @@ static int xf_input_event(xfContext* xfc, XIDeviceEvent* event, int evtype)
static int xf_input_handle_event_remote(xfContext* xfc, const XEvent* event)
{
union
{
union {
const XGenericEventCookie* cc;
XGenericEventCookie* vc;
} cookie;

View File

@ -61,8 +61,7 @@
#if !defined(WITH_DSP_FFMPEG)
union _ADPCM
{
union _ADPCM {
struct
{
INT16 last_sample[2];

View File

@ -289,7 +289,7 @@ static BOOL nsc_encode_subsampling(NSC_CONTEXT* context)
if (tempWidth > context->priv->PlaneBuffersLength / tempHeight)
return FALSE;
for (y = 0; y < tempHeight >> 1; y++)
for (y = 0; y<tempHeight>> 1; y++)
{
UINT32 x;
BYTE* co_dst = context->priv->PlaneBuffers[1] + y * (tempWidth >> 1);
@ -299,7 +299,7 @@ static BOOL nsc_encode_subsampling(NSC_CONTEXT* context)
const INT8* cg_src0 = (INT8*)context->priv->PlaneBuffers[2] + (y << 1) * tempWidth;
const INT8* cg_src1 = cg_src0 + tempWidth;
for (x = 0; x < tempWidth >> 1; x++)
for (x = 0; x<tempWidth>> 1; x++)
{
*co_dst++ = (BYTE)(((INT16)*co_src0 + (INT16) * (co_src0 + 1) + (INT16)*co_src1 +
(INT16) * (co_src1 + 1)) >>

View File

@ -335,7 +335,7 @@ static void nsc_encode_subsampling_sse2(NSC_CONTEXT* context)
tempWidth = ROUND_UP_TO(context->width, 8);
tempHeight = ROUND_UP_TO(context->height, 2);
for (y = 0; y < tempHeight >> 1; y++)
for (y = 0; y<tempHeight>> 1; y++)
{
UINT32 x;
co_dst = context->priv->PlaneBuffers[1] + y * (tempWidth >> 1);
@ -345,7 +345,7 @@ static void nsc_encode_subsampling_sse2(NSC_CONTEXT* context)
cg_src0 = (INT8*)context->priv->PlaneBuffers[2] + (y << 1) * tempWidth;
cg_src1 = cg_src0 + tempWidth;
for (x = 0; x < tempWidth >> 1; x += 8)
for (x = 0; x<tempWidth>> 1; x += 8)
{
t = _mm_loadu_si128((__m128i*)co_src0);
t = _mm_avg_epu8(t, _mm_loadu_si128((__m128i*)co_src1));

View File

@ -20,7 +20,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
# include "config.h"
#endif
#include <winpr/crt.h>

View File

@ -251,15 +251,15 @@ static BOOL rdp_write_general_capability_set(wStream* s, const rdpSettings* sett
settings->OsMajorType, settings->OsMinorType, UINT16_MAX);
return FALSE;
}
Stream_Write_UINT16(s, (UINT16)settings->OsMajorType); /* osMajorType (2 bytes) */
Stream_Write_UINT16(s, (UINT16)settings->OsMinorType); /* osMinorType (2 bytes) */
Stream_Write_UINT16(s, CAPS_PROTOCOL_VERSION); /* protocolVersion (2 bytes) */
Stream_Write_UINT16(s, 0); /* pad2OctetsA (2 bytes) */
Stream_Write_UINT16(s, 0); /* generalCompressionTypes (2 bytes) */
Stream_Write_UINT16(s, extraFlags); /* extraFlags (2 bytes) */
Stream_Write_UINT16(s, 0); /* updateCapabilityFlag (2 bytes) */
Stream_Write_UINT16(s, 0); /* remoteUnshareFlag (2 bytes) */
Stream_Write_UINT16(s, 0); /* generalCompressionLevel (2 bytes) */
Stream_Write_UINT16(s, (UINT16)settings->OsMajorType); /* osMajorType (2 bytes) */
Stream_Write_UINT16(s, (UINT16)settings->OsMinorType); /* osMinorType (2 bytes) */
Stream_Write_UINT16(s, CAPS_PROTOCOL_VERSION); /* protocolVersion (2 bytes) */
Stream_Write_UINT16(s, 0); /* pad2OctetsA (2 bytes) */
Stream_Write_UINT16(s, 0); /* generalCompressionTypes (2 bytes) */
Stream_Write_UINT16(s, extraFlags); /* extraFlags (2 bytes) */
Stream_Write_UINT16(s, 0); /* updateCapabilityFlag (2 bytes) */
Stream_Write_UINT16(s, 0); /* remoteUnshareFlag (2 bytes) */
Stream_Write_UINT16(s, 0); /* generalCompressionLevel (2 bytes) */
Stream_Write_UINT8(s, settings->RefreshRect ? 1 : 0); /* refreshRectSupport (1 byte) */
Stream_Write_UINT8(s, settings->SuppressOutput ? 1 : 0); /* suppressOutputSupport (1 byte) */
return rdp_capability_set_finish(s, (UINT16)header, CAPSET_TYPE_GENERAL);
@ -420,19 +420,19 @@ static BOOL rdp_write_bitmap_capability_set(wStream* s, const rdpSettings* setti
else
preferredBitsPerPixel = 8;
Stream_Write_UINT16(s, preferredBitsPerPixel); /* preferredBitsPerPixel (2 bytes) */
Stream_Write_UINT16(s, 1); /* receive1BitPerPixel (2 bytes) */
Stream_Write_UINT16(s, 1); /* receive4BitsPerPixel (2 bytes) */
Stream_Write_UINT16(s, 1); /* receive8BitsPerPixel (2 bytes) */
Stream_Write_UINT16(s, preferredBitsPerPixel); /* preferredBitsPerPixel (2 bytes) */
Stream_Write_UINT16(s, 1); /* receive1BitPerPixel (2 bytes) */
Stream_Write_UINT16(s, 1); /* receive4BitsPerPixel (2 bytes) */
Stream_Write_UINT16(s, 1); /* receive8BitsPerPixel (2 bytes) */
Stream_Write_UINT16(s, (UINT16)settings->DesktopWidth); /* desktopWidth (2 bytes) */
Stream_Write_UINT16(s, (UINT16)settings->DesktopHeight); /* desktopHeight (2 bytes) */
Stream_Write_UINT16(s, 0); /* pad2Octets (2 bytes) */
Stream_Write_UINT16(s, 0); /* pad2Octets (2 bytes) */
Stream_Write_UINT16(s, (UINT16)settings->DesktopResize); /* desktopResizeFlag (2 bytes) */
Stream_Write_UINT16(s, 1); /* bitmapCompressionFlag (2 bytes) */
Stream_Write_UINT8(s, 0); /* highColorFlags (1 byte) */
Stream_Write_UINT8(s, drawingFlags); /* drawingFlags (1 byte) */
Stream_Write_UINT16(s, 1); /* multipleRectangleSupport (2 bytes) */
Stream_Write_UINT16(s, 0); /* pad2OctetsB (2 bytes) */
Stream_Write_UINT16(s, 1); /* bitmapCompressionFlag (2 bytes) */
Stream_Write_UINT8(s, 0); /* highColorFlags (1 byte) */
Stream_Write_UINT8(s, drawingFlags); /* drawingFlags (1 byte) */
Stream_Write_UINT16(s, 1); /* multipleRectangleSupport (2 bytes) */
Stream_Write_UINT16(s, 0); /* pad2OctetsB (2 bytes) */
return rdp_capability_set_finish(s, (UINT16)header, CAPSET_TYPE_BITMAP);
}
@ -767,12 +767,12 @@ static BOOL rdp_write_bitmap_cache_capability_set(wStream* s, const rdpSettings*
size = bpp * 256;
if (size > UINT16_MAX)
return FALSE;
Stream_Write_UINT16(s, 200); /* Cache0Entries (2 bytes) */
Stream_Write_UINT16(s, 200); /* Cache0Entries (2 bytes) */
Stream_Write_UINT16(s, (UINT16)size); /* Cache0MaximumCellSize (2 bytes) */
size = bpp * 1024;
if (size > UINT16_MAX)
return FALSE;
Stream_Write_UINT16(s, 600); /* Cache1Entries (2 bytes) */
Stream_Write_UINT16(s, 600); /* Cache1Entries (2 bytes) */
Stream_Write_UINT16(s, (UINT16)size); /* Cache1MaximumCellSize (2 bytes) */
size = bpp * 4096;
if (size > UINT16_MAX)
@ -1026,7 +1026,7 @@ static BOOL rdp_write_pointer_capability_set(wStream* s, const rdpSettings* sett
return FALSE;
colorPointerFlag = (settings->ColorPointerFlag) ? 1 : 0;
Stream_Write_UINT16(s, colorPointerFlag); /* colorPointerFlag (2 bytes) */
Stream_Write_UINT16(s, colorPointerFlag); /* colorPointerFlag (2 bytes) */
Stream_Write_UINT16(s,
(UINT16)settings->PointerCacheSize); /* colorPointerCacheSize (2 bytes) */
@ -1581,7 +1581,7 @@ static BOOL rdp_write_glyph_cache_capability_set(wStream* s, const rdpSettings*
rdp_write_cache_definition(s, &(settings->GlyphCache[9])); /* glyphCache9 (4 bytes) */
rdp_write_cache_definition(s, settings->FragCache); /* fragCache (4 bytes) */
Stream_Write_UINT16(s, (UINT16)settings->GlyphSupportLevel); /* glyphSupportLevel (2 bytes) */
Stream_Write_UINT16(s, 0); /* pad2Octets (2 bytes) */
Stream_Write_UINT16(s, 0); /* pad2Octets (2 bytes) */
return rdp_capability_set_finish(s, (UINT16)header, CAPSET_TYPE_GLYPH_CACHE);
}
@ -3225,7 +3225,7 @@ static BOOL rdp_print_bitmap_codecs_capability_set(wStream* s)
return FALSE;
if (Stream_GetRemainingLength(s) < 3)
return FALSE;
Stream_Read_UINT8(s, codecId); /* codecId (1 byte) */
Stream_Read_UINT8(s, codecId); /* codecId (1 byte) */
WLog_INFO(TAG, "\tcodecGuid: 0x");
rdp_print_bitmap_codec_guid(&codecGuid);
WLog_INFO(TAG, " (%s)", rdp_get_bitmap_codec_guid_name(&codecGuid));
@ -4011,9 +4011,9 @@ static BOOL rdp_write_demand_active(wStream* s, rdpSettings* settings)
if (lengthCombinedCapabilities > UINT16_MAX)
return FALSE;
Stream_Write_UINT16(
s, (UINT16)lengthCombinedCapabilities); /* lengthCombinedCapabilities (2 bytes) */
Stream_SetPosition(s, bm); /* go back to numberCapabilities */
Stream_Write_UINT16(s, numberCapabilities); /* numberCapabilities (2 bytes) */
s, (UINT16)lengthCombinedCapabilities); /* lengthCombinedCapabilities (2 bytes) */
Stream_SetPosition(s, bm); /* go back to numberCapabilities */
Stream_Write_UINT16(s, numberCapabilities); /* numberCapabilities (2 bytes) */
#ifdef WITH_DEBUG_CAPABILITIES
Stream_Seek_UINT16(s);
rdp_print_capability_sets(s, numberCapabilities, FALSE);
@ -4243,9 +4243,9 @@ static BOOL rdp_write_confirm_active(wStream* s, rdpSettings* settings)
if (lengthCombinedCapabilities > UINT16_MAX)
return FALSE;
Stream_Write_UINT16(
s, (UINT16)lengthCombinedCapabilities); /* lengthCombinedCapabilities (2 bytes) */
Stream_SetPosition(s, bm); /* go back to numberCapabilities */
Stream_Write_UINT16(s, numberCapabilities); /* numberCapabilities (2 bytes) */
s, (UINT16)lengthCombinedCapabilities); /* lengthCombinedCapabilities (2 bytes) */
Stream_SetPosition(s, bm); /* go back to numberCapabilities */
Stream_Write_UINT16(s, numberCapabilities); /* numberCapabilities (2 bytes) */
#ifdef WITH_DEBUG_CAPABILITIES
Stream_Seek_UINT16(s);
rdp_print_capability_sets(s, numberCapabilities, FALSE);

View File

@ -448,8 +448,7 @@ BOOL freerdp_channels_data(freerdp* instance, UINT16 channelId, const BYTE* cdat
rdpChannels* channels;
rdpMcsChannel* channel = NULL;
CHANNEL_OPEN_DATA* pChannelOpenData;
union
{
union {
const BYTE* pcb;
BYTE* pb;
} data;

View File

@ -525,8 +525,7 @@ typedef struct
rpcconn_common_hdr_t header;
} rpcconn_shutdown_hdr_t;
typedef union
{
typedef union {
rpcconn_common_hdr_t common;
rpcconn_alter_context_hdr_t alter_context;
rpcconn_alter_context_response_hdr_t alter_context_response;

View File

@ -466,8 +466,7 @@ fail:
static BOOL rdp_read_info_string(UINT32 flags, wStream* s, size_t cbLenNonNull, CHAR** dst,
size_t max)
{
union
{
union {
char c;
WCHAR w;
BYTE b[2];
@ -714,8 +713,7 @@ static BOOL rdp_write_info_packet(rdpRdp* rdp, wStream* s)
{
if (settings->RedirectionPassword && settings->RedirectionPasswordLength > 0)
{
union
{
union {
BYTE* bp;
WCHAR* wp;
} ptrconv;
@ -918,8 +916,7 @@ static BOOL rdp_recv_logon_info_v1(rdpRdp* rdp, wStream* s, logon_info* info)
{
UINT32 cbDomain;
UINT32 cbUserName;
union
{
union {
BYTE* bp;
WCHAR* wp;
} ptrconv;

View File

@ -204,8 +204,7 @@ BOOL pf_modules_run_filter(PF_FILTER_TYPE type, proxyData* pdata, void* param)
*/
static BOOL pf_modules_set_plugin_data(const char* plugin_name, proxyData* pdata, void* data)
{
union
{
union {
const char* ccp;
char* cp;
} ccharconv;
@ -234,8 +233,7 @@ static BOOL pf_modules_set_plugin_data(const char* plugin_name, proxyData* pdata
*/
static void* pf_modules_get_plugin_data(const char* plugin_name, proxyData* pdata)
{
union
{
union {
const char* ccp;
char* cp;
} ccharconv;

View File

@ -276,8 +276,7 @@ struct uwac_output_geometry_event
typedef struct uwac_output_geometry_event UwacOutputGeometryEvent;
/** @brief */
union uwac_event
{
union uwac_event {
int type;
UwacOutputNewEvent output_new;
UwacOutputGeometryEvent output_geometry;

View File

@ -168,8 +168,7 @@ extern "C"
{
ASN1uint32_t length;
union
{
union {
void* encoded;
void* value;
};
@ -362,8 +361,7 @@ extern "C"
{
ASN1option_e eOption;
union
{
union {
ASN1encodingrule_e eRule;
ASN1uint32_t cbRequiredDecodedBufSize;

View File

@ -180,8 +180,7 @@
#define MOVEFILE_CREATE_HARDLINK 0x10
#define MOVEFILE_FAIL_IF_NOT_TRACKABLE 0x20
typedef union _FILE_SEGMENT_ELEMENT
{
typedef union _FILE_SEGMENT_ELEMENT {
PVOID64 Buffer;
ULONGLONG Alignment;
} FILE_SEGMENT_ELEMENT, *PFILE_SEGMENT_ELEMENT;

View File

@ -86,8 +86,7 @@ extern "C"
#ifdef _WIN64
typedef union DECLSPEC_ALIGN(16) _WINPR_SLIST_HEADER
{
typedef union DECLSPEC_ALIGN(16) _WINPR_SLIST_HEADER {
struct
{
ULONGLONG Alignment;
@ -117,8 +116,7 @@ extern "C"
#else /* _WIN64 */
typedef union _WINPR_SLIST_HEADER
{
typedef union _WINPR_SLIST_HEADER {
ULONGLONG Alignment;
struct

View File

@ -35,8 +35,7 @@ typedef struct _OVERLAPPED
{
ULONG_PTR Internal;
ULONG_PTR InternalHigh;
union
{
union {
struct
{
DWORD Offset;

View File

@ -28,8 +28,7 @@
#define __RPC_WIN32__ 1
#define TARGET_IS_NT50_OR_LATER 1
typedef union _CLIENT_CALL_RETURN
{
typedef union _CLIENT_CALL_RETURN {
void* Pointer;
LONG_PTR Simple;
} CLIENT_CALL_RETURN;
@ -244,8 +243,7 @@ struct _MIDL_STUB_DESC
void* (*pfnAllocate)(size_t);
void (*pfnFree)(void*);
union
{
union {
handle_t* pAutoHandle;
handle_t* pPrimitiveHandle;
PGENERIC_BINDING_INFO pGenericBindingInfo;
@ -352,8 +350,7 @@ typedef struct
PARAM_ATTRIBUTES Attributes;
unsigned short StackOffset;
union
{
union {
unsigned char FormatChar;
unsigned short Offset;
} Type;

View File

@ -1431,8 +1431,7 @@ typedef OBJECT_ATTRIBUTES* POBJECT_ATTRIBUTES;
typedef struct _IO_STATUS_BLOCK
{
union
{
union {
#ifdef _WIN32
NTSTATUS Status;
#else

View File

@ -56,8 +56,7 @@ typedef struct _TP_CALLBACK_ENVIRON_V1
struct _ACTIVATION_CONTEXT* ActivationContext;
PTP_SIMPLE_CALLBACK FinalizationCallback;
union
{
union {
DWORD Flags;
struct
{

View File

@ -308,8 +308,7 @@ typedef struct _RPC_SECURITY_QOS_V2_W
unsigned long IdentityTracking;
unsigned long ImpersonationType;
unsigned long AdditionalSecurityInfoType;
union
{
union {
RPC_HTTP_TRANSPORT_CREDENTIALS_W* HttpCredentials;
} u;
} RPC_SECURITY_QOS_V2_W, *PRPC_SECURITY_QOS_V2_W;
@ -321,8 +320,7 @@ typedef struct _RPC_SECURITY_QOS_V2_A
unsigned long IdentityTracking;
unsigned long ImpersonationType;
unsigned long AdditionalSecurityInfoType;
union
{
union {
RPC_HTTP_TRANSPORT_CREDENTIALS_A* HttpCredentials;
} u;
} RPC_SECURITY_QOS_V2_A, *PRPC_SECURITY_QOS_V2_A;
@ -336,8 +334,7 @@ typedef struct _RPC_SECURITY_QOS_V3_W
unsigned long IdentityTracking;
unsigned long ImpersonationType;
unsigned long AdditionalSecurityInfoType;
union
{
union {
RPC_HTTP_TRANSPORT_CREDENTIALS_W* HttpCredentials;
} u;
void* Sid;
@ -350,8 +347,7 @@ typedef struct _RPC_SECURITY_QOS_V3_A
unsigned long IdentityTracking;
unsigned long ImpersonationType;
unsigned long AdditionalSecurityInfoType;
union
{
union {
RPC_HTTP_TRANSPORT_CREDENTIALS_A* HttpCredentials;
} u;
void* Sid;
@ -444,8 +440,7 @@ typedef struct _RPC_BINDING_HANDLE_TEMPLATE
unsigned long ProtocolSequence;
unsigned short* NetworkAddress;
unsigned short* StringEndpoint;
union
{
union {
unsigned short* Reserved;
} u1;
UUID ObjectUuid;

View File

@ -250,8 +250,7 @@ typedef struct
{
SCARD_IO_REQUEST ioRequest;
BYTE bSw1, bSw2;
union
{
union {
SCARD_T0_COMMAND CmdBytes;
BYTE rgbHeader[5];
} DUMMYUNIONNAME;
@ -473,8 +472,7 @@ typedef struct
DWORD dwShareMode;
DWORD dwPreferredProtocols;
READER_SEL_REQUEST_MATCH_TYPE MatchType;
union
{
union {
struct
{
DWORD cbReaderNameOffset;

View File

@ -202,8 +202,7 @@ extern "C"
ULONG Version;
DWORD Flags;
union
{
union {
struct
{
HMODULE LocalizedReasonModule;

View File

@ -75,8 +75,7 @@ extern "C"
typedef struct _SYSTEM_INFO
{
union
{
union {
DWORD dwOemId;
struct

View File

@ -178,8 +178,7 @@ struct sockaddr_in6_old
IN6_ADDR sin6_addr;
};
typedef union sockaddr_gen
{
typedef union sockaddr_gen {
struct sockaddr Address;
struct sockaddr_in AddressIn;
struct sockaddr_in6_old AddressIn6;

View File

@ -549,13 +549,11 @@ typedef struct _WTSINFOEX_LEVEL1_A
DWORD OutgoingCompressedBytes;
} WTSINFOEX_LEVEL1_A, *PWTSINFOEX_LEVEL1_A;
typedef union _WTSINFOEX_LEVEL_W
{
typedef union _WTSINFOEX_LEVEL_W {
WTSINFOEX_LEVEL1_W WTSInfoExLevel1;
} WTSINFOEX_LEVEL_W, *PWTSINFOEX_LEVEL_W;
typedef union _WTSINFOEX_LEVEL_A
{
typedef union _WTSINFOEX_LEVEL_A {
WTSINFOEX_LEVEL1_A WTSInfoExLevel1;
} WTSINFOEX_LEVEL_A, *PWTSINFOEX_LEVEL_A;

View File

@ -44,8 +44,7 @@ struct _reg_val
RegVal* prev;
RegVal* next;
union reg_data
{
union reg_data {
DWORD dword;
char* string;
} data;

View File

@ -764,8 +764,7 @@ static LONG WINAPI PCSC_SCardListReaderGroups_Internal(SCARDCONTEXT hContext, LP
PCSC_LONG status = SCARD_S_SUCCESS;
BOOL pcchGroupsAlloc = FALSE;
PCSC_DWORD pcsc_cchGroups = 0;
union
{
union {
LPSTR lpstr;
LPSTR* lppstr;
} conv;
@ -836,8 +835,7 @@ static LONG WINAPI PCSC_SCardListReaderGroupsW(SCARDCONTEXT hContext, LPWSTR msz
LPSTR mszGroupsA = NULL;
LPSTR* pMszGroupsA = &mszGroupsA;
LONG status = SCARD_S_SUCCESS;
union
{
union {
LPWSTR lpstr;
LPWSTR* lppstr;
} conv;
@ -873,8 +871,7 @@ static LONG WINAPI PCSC_SCardListReaders_Internal(SCARDCONTEXT hContext, LPCSTR
PCSC_LONG status = SCARD_S_SUCCESS;
BOOL pcchReadersAlloc = FALSE;
PCSC_DWORD pcsc_cchReaders = 0;
union
{
union {
LPSTR lpstr;
LPSTR* lppstr;
} conv;
@ -966,8 +963,7 @@ static LONG WINAPI PCSC_SCardListReadersW(SCARDCONTEXT hContext, LPCWSTR mszGrou
LPSTR* pMszReadersA = &mszReadersA;
LONG status = SCARD_S_SUCCESS;
BOOL nullCardContext = FALSE;
union
{
union {
LPWSTR lpstr;
LPWSTR* lppstr;
} conv;
@ -1883,8 +1879,7 @@ static LONG WINAPI PCSC_SCardStatus_Internal(SCARDHANDLE hCard, LPSTR mszReaderN
if (tATR)
{
union
{
union {
BYTE* pb;
BYTE** ppb;
} conv;
@ -1895,8 +1890,7 @@ static LONG WINAPI PCSC_SCardStatus_Internal(SCARDHANDLE hCard, LPSTR mszReaderN
if (tReader)
{
union
{
union {
CHAR* pc;
CHAR** ppc;
WCHAR* pw;
@ -2021,8 +2015,7 @@ static LONG WINAPI PCSC_SCardTransmit(SCARDHANDLE hCard, LPCSCARD_IO_REQUEST pio
BYTE* pcsc_pbExtraBytes = NULL;
PCSC_DWORD pcsc_cbSendLength = (PCSC_DWORD)cbSendLength;
PCSC_DWORD pcsc_cbRecvLength = 0;
union
{
union {
const PCSC_SCARD_IO_REQUEST* pcs;
PCSC_SCARD_IO_REQUEST* ps;
LPSCARD_IO_REQUEST lps;
@ -2230,8 +2223,7 @@ static LONG WINAPI PCSC_SCardGetAttrib_Internal(SCARDHANDLE hCard, DWORD dwAttrI
PCSC_SCARDHANDLE* pCard = NULL;
PCSC_DWORD pcsc_dwAttrId = (PCSC_DWORD)dwAttrId;
PCSC_DWORD pcsc_cbAttrLen = 0;
union
{
union {
BYTE* pb;
BYTE** ppb;
} conv;
@ -2303,8 +2295,7 @@ static LONG WINAPI PCSC_SCardGetAttrib_FriendlyName(SCARDHANDLE hCard, DWORD dwA
WCHAR* pbAttrW = NULL;
SCARDCONTEXT hContext;
LONG status = SCARD_S_SUCCESS;
union
{
union {
WCHAR** ppw;
BYTE* pb;
BYTE** ppb;
@ -2409,8 +2400,7 @@ static LONG WINAPI PCSC_SCardGetAttrib(SCARDHANDLE hCard, DWORD dwAttrId, LPBYTE
SCARDCONTEXT hContext;
BOOL pcbAttrLenAlloc = FALSE;
LONG status = SCARD_S_SUCCESS;
union
{
union {
BYTE* pb;
BYTE** ppb;
} conv;
@ -2495,8 +2485,7 @@ static LONG WINAPI PCSC_SCardGetAttrib(SCARDHANDLE hCard, DWORD dwAttrId, LPBYTE
if (status == SCARD_S_SUCCESS)
{
union
{
union {
BYTE* pb;
LPDWORD pd;
} conv;
@ -2517,8 +2506,7 @@ static LONG WINAPI PCSC_SCardGetAttrib(SCARDHANDLE hCard, DWORD dwAttrId, LPBYTE
{
UINT32 channelType = 0x20; /* USB */
UINT32 channelNumber = 0;
union
{
union {
BYTE* pb;
BYTE** ppb;
DWORD* ppd;
@ -2701,8 +2689,7 @@ static LONG WINAPI PCSC_SCardReadCacheA(SCARDCONTEXT hContext, UUID* CardIdentif
if (*DataLen == SCARD_AUTOALLOCATE)
{
BYTE* mem;
union
{
union {
BYTE* pb;
BYTE** ppb;
} conv;
@ -2753,8 +2740,7 @@ static LONG WINAPI PCSC_SCardReadCacheW(SCARDCONTEXT hContext, UUID* CardIdentif
if (*DataLen == SCARD_AUTOALLOCATE)
{
BYTE* mem;
union
{
union {
BYTE* pb;
BYTE** ppb;
} conv;

View File

@ -795,15 +795,13 @@ typedef struct
/* Position in the argument list that this parameter refers to */
int position;
/* The data from the argument list */
union
{
union {
char* string;
#if TRIO_FEATURE_WIDECHAR
trio_wchar_t* wstring;
#endif
trio_pointer_t pointer;
union
{
union {
trio_intmax_t as_signed;
trio_uintmax_t as_unsigned;
} number;
@ -817,8 +815,7 @@ typedef struct
} data;
#if TRIO_FEATURE_USER_DEFINED
/* For the user-defined specifier */
union
{
union {
char namespace[MAX_USER_NAME];
int handler; /* if flags & FLAGS_USER_DEFINED_PARAMETER */
} user_defined;
@ -829,8 +826,7 @@ typedef struct
/* Container for customized functions */
typedef struct
{
union
{
union {
trio_outstream_t out;
trio_instream_t in;
} stream;
@ -865,8 +861,7 @@ typedef struct _trio_class_t
* if there had been sufficient space.
*/
int processed;
union
{
union {
/*
* The number of characters that are actually written. Processed and
* committed will only differ for the *nprintf functions.