Merge pull request #1985 from bmiklautz/fix/warnings
Fix compiler warnings and build
This commit is contained in:
commit
74b5f2c23b
@ -36,6 +36,7 @@
|
||||
#include "cliprdr_main.h"
|
||||
#include "cliprdr_format.h"
|
||||
|
||||
#ifdef WITH_DEBUG_CLIPRDR
|
||||
static const char* const CB_MSG_TYPE_STRINGS[] =
|
||||
{
|
||||
"",
|
||||
@ -51,6 +52,7 @@ static const char* const CB_MSG_TYPE_STRINGS[] =
|
||||
"CB_LOCK_CLIPDATA"
|
||||
"CB_UNLOCK_CLIPDATA"
|
||||
};
|
||||
#endif
|
||||
|
||||
CliprdrClientContext* cliprdr_get_client_interface(cliprdrPlugin* cliprdr)
|
||||
{
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -32,6 +32,7 @@
|
||||
|
||||
#include "transport.h"
|
||||
|
||||
#ifdef WITH_DEBUG_NEGO
|
||||
static const char* const NEGO_STATE_STRINGS[] =
|
||||
{
|
||||
"NEGO_STATE_INITIAL",
|
||||
@ -55,6 +56,7 @@ static const char PROTOCOL_SECURITY_STRINGS[9][4] =
|
||||
"UNK",
|
||||
"EXT"
|
||||
};
|
||||
#endif /* WITH_DEBUG_NEGO */
|
||||
|
||||
BOOL nego_security_connect(rdpNego* nego);
|
||||
|
||||
|
@ -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());
|
||||
|
@ -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");
|
||||
|
@ -18,21 +18,23 @@
|
||||
set(MODULE_NAME "winpr-comm")
|
||||
set(MODULE_PREFIX "WINPR_COMM")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
comm.c
|
||||
comm.h
|
||||
comm_io.c
|
||||
comm_ioctl.c
|
||||
comm_ioctl.h
|
||||
comm_serial_sys.c
|
||||
comm_serial_sys.h
|
||||
comm_sercx_sys.c
|
||||
comm_sercx_sys.h
|
||||
comm_sercx2_sys.c
|
||||
comm_sercx2_sys.h)
|
||||
if(UNIX AND NOT WIN32 AND NOT APPLE)
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
comm.c
|
||||
comm.h
|
||||
comm_io.c
|
||||
comm_ioctl.c
|
||||
comm_ioctl.h
|
||||
comm_serial_sys.c
|
||||
comm_serial_sys.h
|
||||
comm_sercx_sys.c
|
||||
comm_sercx_sys.h
|
||||
comm_sercx2_sys.c
|
||||
comm_sercx2_sys.h)
|
||||
|
||||
winpr_module_add(${${MODULE_PREFIX}_SRCS})
|
||||
winpr_module_add(${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
if(BUILD_TESTING AND UNIX AND NOT WIN32)
|
||||
add_subdirectory(test)
|
||||
if(BUILD_TESTING)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
endif()
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -54,7 +54,7 @@ WCHAR* _wcsdup(const WCHAR* strSource)
|
||||
if (strSource == NULL)
|
||||
return NULL;
|
||||
|
||||
#if sun
|
||||
#if defined(sun) && sun
|
||||
strDestination = wsdup(strSource);
|
||||
#elif defined(__APPLE__) && defined(__MACH__) || defined(ANDROID)
|
||||
strDestination = malloc(wcslen((wchar_t*)strSource));
|
||||
|
@ -282,7 +282,7 @@ LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination, LONGLONG E
|
||||
return previousValue;
|
||||
}
|
||||
|
||||
#elif ANDROID || (defined(__GNUC__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8))
|
||||
#elif (defined(ANDROID) && ANDROID) || (defined(__GNUC__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8))
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
|
@ -101,7 +101,7 @@ DWORD SetCriticalSectionSpinCount(LPCRITICAL_SECTION lpCriticalSection, DWORD dw
|
||||
#endif
|
||||
}
|
||||
|
||||
VOID _WaitForCriticalSection(LPCRITICAL_SECTION lpCriticalSection)
|
||||
static VOID _WaitForCriticalSection(LPCRITICAL_SECTION lpCriticalSection)
|
||||
{
|
||||
#if defined(__APPLE__)
|
||||
semaphore_wait(*((winpr_sem_t*) lpCriticalSection->LockSemaphore));
|
||||
@ -110,7 +110,7 @@ VOID _WaitForCriticalSection(LPCRITICAL_SECTION lpCriticalSection)
|
||||
#endif
|
||||
}
|
||||
|
||||
VOID _UnWaitCriticalSection(LPCRITICAL_SECTION lpCriticalSection)
|
||||
static VOID _UnWaitCriticalSection(LPCRITICAL_SECTION lpCriticalSection)
|
||||
{
|
||||
#if defined __APPLE__
|
||||
semaphore_signal(*((winpr_sem_t*) lpCriticalSection->LockSemaphore));
|
||||
|
@ -190,10 +190,14 @@ BOOL SetWaitableTimer(HANDLE hTimer, const LARGE_INTEGER* lpDueTime, LONG lPerio
|
||||
{
|
||||
ULONG Type;
|
||||
PVOID Object;
|
||||
int status = 0;
|
||||
WINPR_TIMER* timer;
|
||||
LONGLONG seconds = 0;
|
||||
#ifdef WITH_POSIX_TIMER
|
||||
LONGLONG seconds = 0;
|
||||
LONGLONG nanoseconds = 0;
|
||||
#ifdef HAVE_TIMERFD_H
|
||||
int status = 0;
|
||||
#endif /* HAVE_TIMERFD_H */
|
||||
#endif /* WITH_POSIX_TIMER */
|
||||
|
||||
if (!winpr_Handle_GetInfo(hTimer, &Type, &Object))
|
||||
return FALSE;
|
||||
|
@ -222,7 +222,6 @@ BOOL GetComputerNameExA(COMPUTER_NAME_FORMAT NameType, LPSTR lpBuffer, LPDWORD l
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
@ -34,7 +34,7 @@
|
||||
* Methods
|
||||
*/
|
||||
|
||||
BOOL BufferPool_ShiftAvailable(wBufferPool* pool, int index, int count)
|
||||
static BOOL BufferPool_ShiftAvailable(wBufferPool* pool, int index, int count)
|
||||
{
|
||||
if (count > 0)
|
||||
{
|
||||
@ -61,7 +61,7 @@ BOOL BufferPool_ShiftAvailable(wBufferPool* pool, int index, int count)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL BufferPool_ShiftUsed(wBufferPool* pool, int index, int count)
|
||||
static BOOL BufferPool_ShiftUsed(wBufferPool* pool, int index, int count)
|
||||
{
|
||||
if (count > 0)
|
||||
{
|
||||
|
@ -68,7 +68,7 @@ WINPR_SAM* SamOpen(BOOL read_only)
|
||||
return sam;
|
||||
}
|
||||
|
||||
BOOL SamLookupStart(WINPR_SAM* sam)
|
||||
static BOOL SamLookupStart(WINPR_SAM* sam)
|
||||
{
|
||||
size_t read_size;
|
||||
long int file_size;
|
||||
@ -105,7 +105,7 @@ BOOL SamLookupStart(WINPR_SAM* sam)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void SamLookupFinish(WINPR_SAM* sam)
|
||||
static void SamLookupFinish(WINPR_SAM* sam)
|
||||
{
|
||||
free(sam->buffer);
|
||||
|
||||
@ -113,7 +113,7 @@ void SamLookupFinish(WINPR_SAM* sam)
|
||||
sam->line = NULL;
|
||||
}
|
||||
|
||||
void HexStrToBin(char* str, BYTE* bin, int length)
|
||||
static void HexStrToBin(char* str, BYTE* bin, int length)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -901,8 +901,8 @@ typedef struct _trio_userdef_t {
|
||||
* Internal Variables
|
||||
*
|
||||
*************************************************************************/
|
||||
|
||||
static TRIO_CONST char rcsid[] = "@(#)$Id: trio.c,v 1.131 2010/09/12 11:08:08 breese Exp $";
|
||||
/* Unused but kept for reference */
|
||||
/* static TRIO_CONST char rcsid[] = "@(#)$Id: trio.c,v 1.131 2010/09/12 11:08:08 breese Exp $"; */
|
||||
|
||||
#if TRIO_FEATURE_FLOAT
|
||||
/*
|
||||
|
@ -168,9 +168,9 @@
|
||||
|
||||
#if defined(__cplusplus)
|
||||
# define PREDEF_STANDARD_CXX
|
||||
#endif
|
||||
#if __cplusplus - 0 >= 199711L
|
||||
# define PREDEF_STANDARD_CXX89
|
||||
# if __cplusplus - 0 >= 199711L
|
||||
# define PREDEF_STANDARD_CXX89
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(TRIO_PLATFORM_UNIX)
|
||||
|
@ -227,7 +227,8 @@
|
||||
*/
|
||||
|
||||
#if !defined(TRIO_EMBED_NAN)
|
||||
static TRIO_CONST char rcsid[] = "@(#)$Id: trionan.c,v 1.33 2005/05/29 11:57:25 breese Exp $";
|
||||
/* Unused but kept for reference */
|
||||
/* static TRIO_CONST char rcsid[] = "@(#)$Id: trionan.c,v 1.33 2005/05/29 11:57:25 breese Exp $"; */
|
||||
#endif
|
||||
|
||||
#if defined(TRIO_FUNC_INTERNAL_MAKE_DOUBLE) \
|
||||
|
@ -160,7 +160,8 @@ struct _trio_string_t
|
||||
*/
|
||||
|
||||
#if !defined(TRIO_EMBED_STRING)
|
||||
static TRIO_CONST char rcsid[] = "@(#)$Id: triostr.c,v 1.36 2010/01/26 13:02:02 breese Exp $";
|
||||
/* Unused but kept for reference */
|
||||
/* static TRIO_CONST char rcsid[] = "@(#)$Id: triostr.c,v 1.36 2010/01/26 13:02:02 breese Exp $"; */
|
||||
#endif
|
||||
|
||||
/*************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user