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) if (strSource == NULL)
return NULL; return NULL;
#if sun #if defined(sun) && sun
strDestination = wsdup(strSource); strDestination = wsdup(strSource);
#elif defined(__APPLE__) && defined(__MACH__) || defined(ANDROID) #elif defined(__APPLE__) && defined(__MACH__) || defined(ANDROID)
strDestination = malloc(wcslen((wchar_t*)strSource)); strDestination = malloc(wcslen((wchar_t*)strSource));

View File

@ -282,7 +282,7 @@ LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination, LONGLONG E
return previousValue; 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> #include <pthread.h>

View File

@ -101,7 +101,7 @@ DWORD SetCriticalSectionSpinCount(LPCRITICAL_SECTION lpCriticalSection, DWORD dw
#endif #endif
} }
VOID _WaitForCriticalSection(LPCRITICAL_SECTION lpCriticalSection) static VOID _WaitForCriticalSection(LPCRITICAL_SECTION lpCriticalSection)
{ {
#if defined(__APPLE__) #if defined(__APPLE__)
semaphore_wait(*((winpr_sem_t*) lpCriticalSection->LockSemaphore)); semaphore_wait(*((winpr_sem_t*) lpCriticalSection->LockSemaphore));
@ -110,7 +110,7 @@ VOID _WaitForCriticalSection(LPCRITICAL_SECTION lpCriticalSection)
#endif #endif
} }
VOID _UnWaitCriticalSection(LPCRITICAL_SECTION lpCriticalSection) static VOID _UnWaitCriticalSection(LPCRITICAL_SECTION lpCriticalSection)
{ {
#if defined __APPLE__ #if defined __APPLE__
semaphore_signal(*((winpr_sem_t*) lpCriticalSection->LockSemaphore)); semaphore_signal(*((winpr_sem_t*) lpCriticalSection->LockSemaphore));

View File

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

View File

@ -34,7 +34,7 @@
* Methods * Methods
*/ */
BOOL BufferPool_ShiftAvailable(wBufferPool* pool, int index, int count) static BOOL BufferPool_ShiftAvailable(wBufferPool* pool, int index, int count)
{ {
if (count > 0) if (count > 0)
{ {
@ -61,7 +61,7 @@ BOOL BufferPool_ShiftAvailable(wBufferPool* pool, int index, int count)
return TRUE; return TRUE;
} }
BOOL BufferPool_ShiftUsed(wBufferPool* pool, int index, int count) static BOOL BufferPool_ShiftUsed(wBufferPool* pool, int index, int count)
{ {
if (count > 0) if (count > 0)
{ {

View File

@ -68,7 +68,7 @@ WINPR_SAM* SamOpen(BOOL read_only)
return sam; return sam;
} }
BOOL SamLookupStart(WINPR_SAM* sam) static BOOL SamLookupStart(WINPR_SAM* sam)
{ {
size_t read_size; size_t read_size;
long int file_size; long int file_size;
@ -105,7 +105,7 @@ BOOL SamLookupStart(WINPR_SAM* sam)
return TRUE; return TRUE;
} }
void SamLookupFinish(WINPR_SAM* sam) static void SamLookupFinish(WINPR_SAM* sam)
{ {
free(sam->buffer); free(sam->buffer);
@ -113,7 +113,7 @@ void SamLookupFinish(WINPR_SAM* sam)
sam->line = NULL; sam->line = NULL;
} }
void HexStrToBin(char* str, BYTE* bin, int length) static void HexStrToBin(char* str, BYTE* bin, int length)
{ {
int i; int i;

View File

@ -168,9 +168,9 @@
#if defined(__cplusplus) #if defined(__cplusplus)
# define PREDEF_STANDARD_CXX # define PREDEF_STANDARD_CXX
#endif # if __cplusplus - 0 >= 199711L
#if __cplusplus - 0 >= 199711L # define PREDEF_STANDARD_CXX89
# define PREDEF_STANDARD_CXX89 # endif
#endif #endif
#if defined(TRIO_PLATFORM_UNIX) #if defined(TRIO_PLATFORM_UNIX)