windows: fix warnings
This commit is contained in:
parent
d128254159
commit
c1eddf31c3
@ -61,6 +61,7 @@ endif()
|
||||
if(MSVC)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Gz")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_X86_")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DFREERDP_EXPORTS")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWIN32_LEAN_AND_MEAN")
|
||||
endif()
|
||||
|
@ -112,7 +112,7 @@ void bitmap_v2_free(rdpBitmapV2* bitmap_v2)
|
||||
{
|
||||
for (i = 0; i < bitmap_v2->maxCells; i++)
|
||||
{
|
||||
for (j = 0; j < bitmap_v2->cells[i].number; j++)
|
||||
for (j = 0; j < (int) bitmap_v2->cells[i].number; j++)
|
||||
{
|
||||
if (bitmap_v2->cells[i].entries[j].entry != NULL)
|
||||
xfree(bitmap_v2->cells[i].entries[j].entry);
|
||||
|
@ -409,7 +409,7 @@ void RLEDECOMPRESS(uint8* pbSrcBuffer, uint32 cbSrcBuffer, uint8* pbDestBuffer,
|
||||
/* Watch out for the end of the first scanline. */
|
||||
if (fFirstLine)
|
||||
{
|
||||
if (pbDest - pbDestBuffer >= rowDelta)
|
||||
if ((uint32)(pbDest - pbDestBuffer) >= rowDelta)
|
||||
{
|
||||
fFirstLine = False;
|
||||
fInsertFgPel = False;
|
||||
|
@ -218,7 +218,7 @@ void certificate_free_x509_certificate_chain(rdpX509CertChain* x509_cert_chain)
|
||||
if (x509_cert_chain == NULL)
|
||||
return;
|
||||
|
||||
for (i = 0; i < x509_cert_chain->count; i++)
|
||||
for (i = 0; i < (int) x509_cert_chain->count; i++)
|
||||
{
|
||||
if (x509_cert_chain->array[i].data != NULL)
|
||||
xfree(x509_cert_chain->array[i].data);
|
||||
@ -256,7 +256,7 @@ void certificate_read_server_x509_certificate_chain(rdpCertificate* certificate,
|
||||
|
||||
certificate->x509_cert_chain = certificate_new_x509_certificate_chain(numCertBlobs);
|
||||
|
||||
for (i = 0; i < numCertBlobs; i++)
|
||||
for (i = 0; i < (int) numCertBlobs; i++)
|
||||
{
|
||||
stream_read_uint32(s, certLength);
|
||||
|
||||
|
@ -148,7 +148,7 @@ STREAM* license_send_stream_init(rdpLicense* license)
|
||||
void license_send(rdpLicense* license, STREAM* s, uint8 type)
|
||||
{
|
||||
int length;
|
||||
uint16 flags;
|
||||
uint8 flags;
|
||||
uint16 wMsgSize;
|
||||
uint16 sec_flags;
|
||||
|
||||
@ -515,7 +515,7 @@ void license_free_binary_blob(LICENSE_BLOB* blob)
|
||||
|
||||
void license_read_scope_list(STREAM* s, SCOPE_LIST* scopeList)
|
||||
{
|
||||
int i;
|
||||
uint32 i;
|
||||
uint32 scopeCount;
|
||||
|
||||
stream_read_uint32(s, scopeCount); /* ScopeCount (4 bytes) */
|
||||
@ -556,7 +556,7 @@ SCOPE_LIST* license_new_scope_list()
|
||||
|
||||
void license_free_scope_list(SCOPE_LIST* scopeList)
|
||||
{
|
||||
int i;
|
||||
uint32 i;
|
||||
|
||||
for (i = 0; i < scopeList->count; i++)
|
||||
{
|
||||
|
@ -222,7 +222,7 @@ void rdp_send_pdu(rdpRdp* rdp, STREAM* s, uint16 type, uint16 channel_id)
|
||||
transport_write(rdp->transport, s);
|
||||
}
|
||||
|
||||
void rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, uint16 type, uint16 channel_id)
|
||||
void rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, uint8 type, uint16 channel_id)
|
||||
{
|
||||
int length;
|
||||
|
||||
|
@ -142,7 +142,7 @@ STREAM* rdp_pdu_init(rdpRdp* rdp);
|
||||
void rdp_send_pdu(rdpRdp* rdp, STREAM* s, uint16 type, uint16 channel_id);
|
||||
|
||||
STREAM* rdp_data_pdu_init(rdpRdp* rdp);
|
||||
void rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, uint16 type, uint16 channel_id);
|
||||
void rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, uint8 type, uint16 channel_id);
|
||||
|
||||
void rdp_send(rdpRdp* rdp, STREAM* s, uint16 channel_id);
|
||||
void rdp_recv(rdpRdp* rdp);
|
||||
|
@ -134,7 +134,7 @@ void update_read_palette(rdpUpdate* update, STREAM* s, PALETTE_UPDATE* palette_u
|
||||
palette_update->number = 256;
|
||||
|
||||
/* paletteEntries */
|
||||
for (i = 0; i < palette_update->number; i++)
|
||||
for (i = 0; i < (int) palette_update->number; i++)
|
||||
{
|
||||
stream_read_uint8(s, byte);
|
||||
color = byte;
|
||||
|
@ -55,7 +55,7 @@ boolean vchan_send(rdpVchan* vchan, uint16 channel_id, uint8* data, int size)
|
||||
{
|
||||
s = rdp_send_stream_init(vchan->instance->rdp);
|
||||
|
||||
if (size > vchan->instance->settings->vc_chunk_size)
|
||||
if (size > (int) vchan->instance->settings->vc_chunk_size)
|
||||
{
|
||||
chunk_size = vchan->instance->settings->vc_chunk_size;
|
||||
}
|
||||
|
@ -127,10 +127,10 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
printf("missing width\n");
|
||||
return 0;
|
||||
}
|
||||
settings->width = strtol(argv[index], &p, 10);
|
||||
settings->width = (uint16) strtol(argv[index], &p, 10);
|
||||
if (*p == 'x')
|
||||
{
|
||||
settings->height = strtol(p + 1, &p, 10);
|
||||
settings->height = (uint16) strtol(p + 1, &p, 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -294,13 +294,13 @@ uint8* dsp_encode_ima_adpcm(ADPCM* adpcm,
|
||||
{
|
||||
*dst++ = adpcm->last_sample[0] & 0xff;
|
||||
*dst++ = (adpcm->last_sample[0] >> 8) & 0xff;
|
||||
*dst++ = adpcm->last_step[0];
|
||||
*dst++ = (uint8) adpcm->last_step[0];
|
||||
*dst++ = 0;
|
||||
if (channels > 1)
|
||||
{
|
||||
*dst++ = adpcm->last_sample[1] & 0xff;
|
||||
*dst++ = (adpcm->last_sample[1] >> 8) & 0xff;
|
||||
*dst++ = adpcm->last_step[1];
|
||||
*dst++ = (uint8) adpcm->last_step[1];
|
||||
*dst++ = 0;
|
||||
}
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ static void svc_plugin_process_received(rdpSvcPlugin* plugin, void* pData, uint3
|
||||
}
|
||||
|
||||
data_in = plugin->priv->data_in;
|
||||
stream_check_size(data_in, dataLength);
|
||||
stream_check_size(data_in, (int) dataLength);
|
||||
stream_write(data_in, pData, dataLength);
|
||||
|
||||
if (dataFlags & CHANNEL_FLAG_LAST)
|
||||
|
Loading…
Reference in New Issue
Block a user