winpr: fix Win32 build warnings

This commit is contained in:
Marc-André Moreau 2014-11-04 10:44:55 -05:00
parent ad611b5c09
commit c5c9423ccf
3 changed files with 6 additions and 5 deletions

View File

@ -105,7 +105,7 @@ static BOOL freerdp_listener_open(freerdp_listener* instance, const char* bind_a
if (status != 0)
{
#ifdef _WIN32
WLog_ERR(_T("getaddrinfo error: %s"), gai_strerror(status));
WLog_ERR("getaddrinfo error: %s", gai_strerrorA(status));
#else
WLog_ERR(TAG, "getaddrinfo");
#endif

View File

@ -23,9 +23,11 @@
#include "config.h"
#endif
#include <winpr/environment.h>
#include <winpr/crt.h>
#include <winpr/error.h>
#include <winpr/environment.h>
#ifndef _WIN32
#define stricmp strcasecmp
@ -326,7 +328,7 @@ LPCH MergeEnvironmentStrings(PCSTR original, PCSTR merge)
if (mergeStringLength == mergeArraySize)
{
mergeArraySize += 128;
mergeStrings = (LPCSTR*) realloc(mergeStrings, mergeArraySize * sizeof(char*));
mergeStrings = (const char**) realloc((void*) mergeStrings, mergeArraySize * sizeof(char*));
if (!mergeStrings)
return NULL;
@ -441,7 +443,7 @@ LPCH MergeEnvironmentStrings(PCSTR original, PCSTR merge)
lpszEnvironmentBlock[offset] = '\0';
free(mergeStrings);
free((void*) mergeStrings);
return lpszEnvironmentBlock;
}

View File

@ -689,7 +689,6 @@ BOOL WINAPI Win32_WTSVirtualChannelQuery(HANDLE hChannelHandle, WTS_VIRTUAL_CLAS
VOID WINAPI Win32_WTSFreeMemory(PVOID pMemory)
{
LocalFree(pMemory);
return TRUE;
}
BOOL WINAPI Win32_WTSFreeMemoryExW(WTS_TYPE_CLASS WTSTypeClass, PVOID pMemory, ULONG NumberOfEntries)