xfreerdp: fix build warnings

This commit is contained in:
Marc-André Moreau 2014-02-10 22:23:59 -05:00
parent cdcd290c44
commit e968bb584e
2 changed files with 23 additions and 12 deletions

View File

@ -1201,12 +1201,13 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
{
if (arg->Flags & COMMAND_LINE_VALUE_PRESENT)
{
UINT32 i;
char** p;
UINT32 i, count = 0;
int count = 0;
p = freerdp_command_line_parse_comma_separated_values(arg->Value, &count);
settings->NumMonitorIds = count;
settings->NumMonitorIds = (UINT32) count;
settings->MonitorIds = (UINT32*) malloc(sizeof(UINT32) * settings->NumMonitorIds);
for (i = 0; i < settings->NumMonitorIds; i++)

View File

@ -38,8 +38,11 @@ static BOOL autodetect_send_rtt_measure_response(rdpRdp* rdp, UINT16 sequenceNum
wStream* s;
/* Send the response PDU to the server */
s = rdp_message_channel_pdu_init(rdp);
if (s == NULL) return FALSE;
if (s == NULL)
return FALSE;
DEBUG_AUTODETECT("sending RTT Measure Response PDU");
@ -60,8 +63,11 @@ static BOOL autodetect_send_bandwidth_measure_results(rdpRdp* rdp, UINT16 respon
timeDelta = GetTickCount() - rdp->autodetect->bandwidthMeasureStartTime;
/* Send the result PDU to the server */
s = rdp_message_channel_pdu_init(rdp);
if (s == NULL) return FALSE;
if (s == NULL)
return FALSE;
DEBUG_AUTODETECT("sending Bandwidth Measure Results PDU -> timeDelta=%u, byteCount=%u", timeDelta, rdp->autodetect->bandwidthMeasureByteCount);
@ -75,13 +81,16 @@ static BOOL autodetect_send_bandwidth_measure_results(rdpRdp* rdp, UINT16 respon
return rdp_send_message_channel_pdu(rdp, s, SEC_AUTODETECT_RSP);
}
static BOOL autodetect_send_netchar_sync(rdpRdp* rdp, UINT16 sequenceNumber)
BOOL autodetect_send_netchar_sync(rdpRdp* rdp, UINT16 sequenceNumber)
{
wStream* s;
/* Send the response PDU to the server */
s = rdp_message_channel_pdu_init(rdp);
if (s == NULL) return FALSE;
if (s == NULL)
return FALSE;
DEBUG_AUTODETECT("sending Network Characteristics Sync PDU -> bandwidth=%u, rtt=%u", rdp->autodetect->netCharBandwidth, rdp->autodetect->netCharAverageRTT);
@ -273,16 +282,17 @@ int rdp_recv_autodetect_packet(rdpRdp* rdp, wStream* s)
rdpAutoDetect* autodetect_new(void)
{
rdpAutoDetect* autodetect = (rdpAutoDetect*)malloc(sizeof(rdpAutoDetect));
if (autodetect)
rdpAutoDetect* autoDetect = (rdpAutoDetect*) malloc(sizeof(rdpAutoDetect));
if (autoDetect)
{
memset(autodetect, 0, sizeof(rdpAutoDetect));
ZeroMemory(autoDetect, sizeof(rdpAutoDetect));
}
return autodetect;
return autoDetect;
}
void autodetect_free(rdpAutoDetect* autodetect)
void autodetect_free(rdpAutoDetect* autoDetect)
{
free(autodetect);
free(autoDetect);
}