Fix compiler warnings.

This commit is based on pull request #1493
This commit is contained in:
Bernhard Miklautz 2014-07-23 17:26:49 +02:00 committed by Bernhard Miklautz
parent 15d2b35574
commit b8415af0d8
8 changed files with 12 additions and 284 deletions

File diff suppressed because it is too large Load Diff

View File

@ -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));

View File

@ -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>

View File

@ -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));

View File

@ -222,7 +222,6 @@ BOOL GetComputerNameExA(COMPUTER_NAME_FORMAT NameType, LPSTR lpBuffer, LPDWORD l
default:
return FALSE;
break;
}
return TRUE;

View File

@ -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)
{

View File

@ -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;

View File

@ -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)