fix compiler warnings

This commit is contained in:
Bernhard Miklautz 2014-07-23 19:08:06 +02:00
parent b8415af0d8
commit 8c318da7b1
6 changed files with 11 additions and 9 deletions

View File

@ -29,6 +29,7 @@
#include <winpr/synch.h>
#include <winpr/thread.h>
#include <winpr/stream.h>
#include <winpr/sysinfo.h>
#include <freerdp/server/echo.h>
@ -166,7 +167,7 @@ static void* echo_server_thread_func(void* arg)
break;
}
IFCALL(echo->context.Response, &echo->context, (PCHAR) Stream_Buffer(s), BytesReturned);
IFCALL(echo->context.Response, &echo->context, (BYTE *) Stream_Buffer(s), BytesReturned);
}
Stream_Free(s, TRUE);

View File

@ -31,6 +31,7 @@
#define USE_GRAY_SCALE 0
#define USE_UPCONVERT 0
#ifdef WITH_OPENH264
static BYTE clip(int x)
{
if (x < 0) return 0;
@ -100,6 +101,7 @@ static UINT32 YUV_to_RGB(BYTE Y, BYTE U, BYTE V)
return RGB32(R, G, B);
}
#endif //WITH_OPENH264
#if USE_UPCONVERT
static BYTE* convert_420_to_444(BYTE* chroma420, int chroma420Width, int chroma420Height, int chroma420Stride)
@ -335,8 +337,8 @@ H264_CONTEXT* h264_context_new(BOOL Compressor)
return h264;
EXCEPTION:
#ifdef WITH_OPENH264
EXCEPTION:
if (h264->pDecoder)
{
WelsDestroyDecoder(h264->pDecoder);

View File

@ -562,7 +562,7 @@ BOOL tcp_connect(rdpTcp* tcp, const char* hostname, int port, int timeout)
}
}
BIO_set_close(tcp->socketBio, BIO_NOCLOSE);
(void)BIO_set_close(tcp->socketBio, BIO_NOCLOSE);
BIO_free(tcp->socketBio);
tcp->socketBio = BIO_new(BIO_s_simple_socket());

View File

@ -111,7 +111,7 @@ int TestRingBuffer(int argc, char* argv[])
if (ringbuffer_used(&ringBuffer) != 15)
{
fprintf(stderr, "invalid used size got %d when i would expect 15\n", ringbuffer_used(&ringBuffer));
fprintf(stderr, "invalid used size got %ld when i would expect 15\n", ringbuffer_used(&ringBuffer));
return -1;
}
@ -134,7 +134,7 @@ int TestRingBuffer(int argc, char* argv[])
if (ringbuffer_used(&ringBuffer) != 5)
{
fprintf(stderr, "invalid used size after read got %d when i would expect 5\n", ringbuffer_used(&ringBuffer));
fprintf(stderr, "invalid used size after read got %ld when i would expect 5\n", ringbuffer_used(&ringBuffer));
return -1;
}
@ -189,7 +189,7 @@ int TestRingBuffer(int argc, char* argv[])
if (ringbuffer_capacity(&ringBuffer) != 10)
{
fprintf(stderr, "not the expected capacity, have %d and expects 10\n", ringbuffer_capacity(&ringBuffer));
fprintf(stderr, "not the expected capacity, have %ld and expects 10\n", ringbuffer_capacity(&ringBuffer));
return -1;
}
fprintf(stderr, "ok\n");
@ -213,7 +213,7 @@ int TestRingBuffer(int argc, char* argv[])
fprintf(stderr, "%d: specific overlaps test...", ++testNo);
if (!test_overlaps())
{
fprintf(stderr, "ko\n", i);
fprintf(stderr, "ko\n");
return -1;
}
fprintf(stderr, "ok\n");

View File

@ -100,7 +100,7 @@ int TestCommConfig(int argc, char* argv[])
ZeroMemory(&commProp, sizeof(COMMPROP));
if (!GetCommProperties(hComm, &commProp))
{
fprintf(stderr, "GetCommProperties failure: GetLastError(): 0x0.8x\n", GetLastError());
fprintf(stderr, "GetCommProperties failure: GetLastError(): 0x%0.8x\n", GetLastError());
return EXIT_FAILURE;
}

View File

@ -139,7 +139,6 @@ void* _aligned_offset_realloc(void* memblock, size_t size, size_t alignment, siz
void* _aligned_offset_recalloc(void* memblock, size_t num, size_t size, size_t alignment, size_t offset)
{
size_t copySize;
void* newMemblock;
WINPR_ALIGNED_MEM* pMem;
WINPR_ALIGNED_MEM* pNewMem;