[api] fix compiler warnings
check #if defined(__GNUC__)
This commit is contained in:
parent
cd4d77af86
commit
593e2bf4a9
@ -430,12 +430,12 @@ BOOL rail_is_feature_supported(const rdpContext* context, UINT32 featureMask)
|
||||
|
||||
if (masked != featureMask)
|
||||
{
|
||||
char mask[256] = { 0 };
|
||||
char actual[256] = { 0 };
|
||||
char maskstr[256] = { 0 };
|
||||
char actualstr[256] = { 0 };
|
||||
|
||||
WLog_WARN(TAG, "have %s, require %s",
|
||||
freerdp_rail_support_flags_to_string(supported, actual, sizeof(actual)),
|
||||
freerdp_rail_support_flags_to_string(featureMask, mask, sizeof(mask)));
|
||||
freerdp_rail_support_flags_to_string(supported, actualstr, sizeof(actualstr)),
|
||||
freerdp_rail_support_flags_to_string(featureMask, maskstr, sizeof(maskstr)));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -3211,7 +3211,6 @@ static int freerdp_client_settings_parse_command_line_arguments_int(
|
||||
{
|
||||
if (arg->Flags & COMMAND_LINE_VALUE_PRESENT)
|
||||
{
|
||||
UINT32 i;
|
||||
union
|
||||
{
|
||||
char** p;
|
||||
@ -3235,7 +3234,7 @@ static int freerdp_client_settings_parse_command_line_arguments_int(
|
||||
|
||||
MonitorIds =
|
||||
freerdp_settings_get_pointer_array_writable(settings, FreeRDP_MonitorIds, 0);
|
||||
for (i = 0; i < count; i++)
|
||||
for (UINT32 i = 0; i < count; i++)
|
||||
{
|
||||
LONGLONG val;
|
||||
|
||||
@ -4096,7 +4095,6 @@ static int freerdp_client_settings_parse_command_line_arguments_int(
|
||||
{
|
||||
if (arg->Flags & COMMAND_LINE_VALUE_PRESENT)
|
||||
{
|
||||
UINT32 i;
|
||||
union
|
||||
{
|
||||
char** p;
|
||||
@ -4106,7 +4104,7 @@ static int freerdp_client_settings_parse_command_line_arguments_int(
|
||||
ptr.p = CommandLineParseCommaSeparatedValues(arg->Value, &count);
|
||||
|
||||
UINT32 EncryptionMethods = 0;
|
||||
for (i = 0; i < count; i++)
|
||||
for (UINT32 i = 0; i < count; i++)
|
||||
{
|
||||
if (option_equals(ptr.pc[i], "40"))
|
||||
EncryptionMethods |= ENCRYPTION_METHOD_40BIT;
|
||||
@ -5206,12 +5204,11 @@ BOOL freerdp_client_load_addins(rdpChannels* channels, rdpSettings* settings)
|
||||
{ FreeRDP_RemdeskVirtualChannel, REMDESK_SVC_CHANNEL_NAME, settings },
|
||||
{ FreeRDP_RemoteApplicationMode, RAIL_SVC_CHANNEL_NAME, settings }
|
||||
};
|
||||
size_t i;
|
||||
|
||||
/**
|
||||
* Step 1: first load dynamic channels according to the settings
|
||||
*/
|
||||
for (i = 0; i < ARRAYSIZE(dynChannels); i++)
|
||||
for (size_t i = 0; i < ARRAYSIZE(dynChannels); i++)
|
||||
{
|
||||
if ((dynChannels[i].settingId == 0) ||
|
||||
freerdp_settings_get_bool(settings, dynChannels[i].settingId))
|
||||
@ -5430,7 +5427,7 @@ BOOL freerdp_client_load_addins(rdpChannels* channels, rdpSettings* settings)
|
||||
}
|
||||
|
||||
/* step 3: schedule some static channels to load depending on the settings */
|
||||
for (i = 0; i < ARRAYSIZE(staticChannels); i++)
|
||||
for (size_t i = 0; i < ARRAYSIZE(staticChannels); i++)
|
||||
{
|
||||
if ((staticChannels[i].settingId == 0) ||
|
||||
freerdp_settings_get_bool(settings, staticChannels[i].settingId))
|
||||
|
@ -90,7 +90,7 @@
|
||||
WLog_VRB("com.freerdp.api", "IFCALLRET(" #_cb ") == NULL"); \
|
||||
} while (0)
|
||||
|
||||
#if 0 //__GNUC__
|
||||
#if 0 // defined(__GNUC__)
|
||||
#define IFCALLRESULT(_default_return, _cb, ...) \
|
||||
({ \
|
||||
(_cb != NULL) ? _cb(__VA_ARGS__) : ({ \
|
||||
@ -103,7 +103,7 @@
|
||||
((_cb != NULL) ? _cb(__VA_ARGS__) : (_default_return))
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#if defined(__GNUC__)
|
||||
#define ALIGN64 __attribute__((aligned(8)))
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
|
@ -2115,15 +2115,17 @@ int ncrush_decompress(NCRUSH_CONTEXT* ncrush, const BYTE* pSrcData, UINT32 SrcSi
|
||||
if (OffsetCacheIndex >= 4)
|
||||
return -1004;
|
||||
|
||||
CopyOffset = ncrush->OffsetCache[OffsetCacheIndex];
|
||||
const UINT16 Mask = get_word(&HuffTableMask[21]);
|
||||
const UINT32 MaskedBits = bits & Mask;
|
||||
if (MaskedBits > ARRAYSIZE(HuffTableLOM))
|
||||
return -1;
|
||||
LengthOfMatch = HuffTableLOM[MaskedBits] & 0xFFF;
|
||||
BitLength = HuffTableLOM[MaskedBits] >> 12;
|
||||
bits >>= BitLength;
|
||||
nbits -= BitLength;
|
||||
{
|
||||
CopyOffset = ncrush->OffsetCache[OffsetCacheIndex];
|
||||
const UINT16 Mask = get_word(&HuffTableMask[21]);
|
||||
const UINT32 MaskedBits = bits & Mask;
|
||||
if (MaskedBits > ARRAYSIZE(HuffTableLOM))
|
||||
return -1;
|
||||
LengthOfMatch = HuffTableLOM[MaskedBits] & 0xFFF;
|
||||
BitLength = HuffTableLOM[MaskedBits] >> 12;
|
||||
bits >>= BitLength;
|
||||
nbits -= BitLength;
|
||||
}
|
||||
|
||||
if (!NCrushFetchBits(&SrcPtr, &SrcEnd, &nbits, &bits))
|
||||
return -1;
|
||||
@ -2187,17 +2189,17 @@ int ncrush_decompress(NCRUSH_CONTEXT* ncrush, const BYTE* pSrcData, UINT32 SrcSi
|
||||
if (!NCrushFetchBits(&SrcPtr, &SrcEnd, &nbits, &bits))
|
||||
return -1;
|
||||
}
|
||||
{
|
||||
const UINT16 Mask = get_word(&HuffTableMask[21]);
|
||||
const UINT32 MaskedBits = bits & Mask;
|
||||
if (MaskedBits >= ARRAYSIZE(HuffTableLOM))
|
||||
return -1;
|
||||
|
||||
const UINT16 Mask = get_word(&HuffTableMask[21]);
|
||||
const UINT32 MaskedBits = bits & Mask;
|
||||
if (MaskedBits >= ARRAYSIZE(HuffTableLOM))
|
||||
return -1;
|
||||
|
||||
LengthOfMatch = HuffTableLOM[MaskedBits] & 0xFFF;
|
||||
BitLength = HuffTableLOM[MaskedBits] >> 12;
|
||||
bits >>= BitLength;
|
||||
nbits -= BitLength;
|
||||
|
||||
LengthOfMatch = HuffTableLOM[MaskedBits] & 0xFFF;
|
||||
BitLength = HuffTableLOM[MaskedBits] >> 12;
|
||||
bits >>= BitLength;
|
||||
nbits -= BitLength;
|
||||
}
|
||||
if (!NCrushFetchBits(&SrcPtr, &SrcEnd, &nbits, &bits))
|
||||
return -1;
|
||||
|
||||
|
@ -560,7 +560,7 @@ BOOL gcc_write_conference_create_response(wStream* s, wStream* userData)
|
||||
0); /* array of server data blocks */
|
||||
}
|
||||
|
||||
BOOL gcc_read_client_unused1_data(wStream* s)
|
||||
static BOOL gcc_read_client_unused1_data(wStream* s)
|
||||
{
|
||||
return Stream_SafeSeek(s, 2);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user