Fixed compilation warnings on mac
This commit is contained in:
parent
13f54fc0dd
commit
68f24477f6
@ -56,7 +56,7 @@ extern "C"
|
||||
FREERDP_API UINT16 freerdp_channels_get_id_by_name(freerdp* instance, const char* channel_name);
|
||||
FREERDP_API const char* freerdp_channels_get_name_by_id(freerdp* instance, UINT16 channelId);
|
||||
|
||||
FREERDP_API const PWtsApiFunctionTable FreeRDP_InitWtsApi(void);
|
||||
FREERDP_API const WtsApiFunctionTable* FreeRDP_InitWtsApi(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -47,7 +47,8 @@ extern "C"
|
||||
FREERDP_API BOOL per_write_enumerated(wStream* s, BYTE enumerated, BYTE count);
|
||||
FREERDP_API BOOL per_write_object_identifier(wStream* s, const BYTE oid[6]);
|
||||
FREERDP_API BOOL per_read_object_identifier(wStream* s, const BYTE oid[6]);
|
||||
FREERDP_API BOOL per_read_octet_string(wStream* s, BYTE* oct_str, UINT16 length, UINT16 min);
|
||||
FREERDP_API BOOL per_read_octet_string(wStream* s, const BYTE* oct_str, UINT16 length,
|
||||
UINT16 min);
|
||||
FREERDP_API BOOL per_write_octet_string(wStream* s, const BYTE* oct_str, UINT16 length,
|
||||
UINT16 min);
|
||||
FREERDP_API BOOL per_read_numeric_string(wStream* s, int min);
|
||||
|
@ -295,7 +295,7 @@ static const WtsApiFunctionTable FreeRDP_WtsApiFunctionTable = {
|
||||
FreeRDP_WTSStartRemoteControlSessionExA
|
||||
};
|
||||
|
||||
const PWtsApiFunctionTable FreeRDP_InitWtsApi(void)
|
||||
const WtsApiFunctionTable* FreeRDP_InitWtsApi(void)
|
||||
{
|
||||
return &FreeRDP_WtsApiFunctionTable;
|
||||
}
|
||||
|
@ -427,7 +427,7 @@ static void per_write_string(wStream* s, BYTE* str, int length)
|
||||
* @return
|
||||
*/
|
||||
|
||||
BOOL per_read_octet_string(wStream* s, BYTE* oct_str, UINT16 length, UINT16 min)
|
||||
BOOL per_read_octet_string(wStream* s, const BYTE* oct_str, UINT16 length, UINT16 min)
|
||||
{
|
||||
UINT16 i;
|
||||
UINT16 mlength;
|
||||
|
@ -215,7 +215,7 @@ static BOOL gdi_Bitmap_SetSurface(rdpContext* context, rdpBitmap* bitmap, BOOL p
|
||||
}
|
||||
|
||||
/* Glyph Class */
|
||||
static BOOL gdi_Glyph_New(rdpContext* context, rdpGlyph* glyph)
|
||||
static BOOL gdi_Glyph_New(rdpContext* context, const rdpGlyph* glyph)
|
||||
{
|
||||
BYTE* data;
|
||||
gdiGlyph* gdi_glyph;
|
||||
|
@ -759,7 +759,7 @@ static const SYSTEM_LOCALE* freerdp_detect_system_locale(void)
|
||||
|
||||
DWORD freerdp_get_system_locale_id(void)
|
||||
{
|
||||
SYSTEM_LOCALE* locale;
|
||||
const SYSTEM_LOCALE* locale;
|
||||
locale = freerdp_detect_system_locale();
|
||||
|
||||
if (locale != NULL)
|
||||
@ -786,7 +786,7 @@ int freerdp_detect_keyboard_layout_from_system_locale(DWORD* keyboardLayoutId)
|
||||
size_t i, j;
|
||||
char language[LOCALE_LANGUAGE_LEN] = { 0 };
|
||||
char country[LOCALE_COUNTRY_LEN] = { 0 };
|
||||
SYSTEM_LOCALE* locale;
|
||||
const SYSTEM_LOCALE* locale;
|
||||
freerdp_get_system_language_and_country_codes(language, country);
|
||||
|
||||
if ((strcmp(language, "C") == 0) || (strcmp(language, "POSIX") == 0))
|
||||
|
@ -690,8 +690,8 @@ static void* convert_filedescriptors_to_file_list(wClipboard* clipboard, UINT32
|
||||
const FILEDESCRIPTORW* cur = &descriptors[x];
|
||||
size_t curLen = _wcsnlen(cur->cFileName, ARRAYSIZE(cur->cFileName));
|
||||
char* curName = NULL;
|
||||
char* stop_at = NULL;
|
||||
char* previous_at = NULL;
|
||||
const char* stop_at = NULL;
|
||||
const char* previous_at = NULL;
|
||||
rc = ConvertFromUnicode(CP_UTF8, 0, cur->cFileName, (int)curLen, &curName, 0, NULL, NULL);
|
||||
|
||||
rc = _snprintf(&dst[pos], alloc - pos, "%s%s/", lineprefix, clipboard->delegate.basePath);
|
||||
|
@ -229,7 +229,7 @@ static void* clipboard_synthesize_cf_dib(wClipboard* clipboard, UINT32 formatId,
|
||||
}
|
||||
else if (formatId == ClipboardGetFormatId(clipboard, "image/bmp"))
|
||||
{
|
||||
BITMAPFILEHEADER* pFileHeader;
|
||||
const BITMAPFILEHEADER* pFileHeader;
|
||||
|
||||
if (SrcSize < (sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER)))
|
||||
return NULL;
|
||||
@ -290,7 +290,7 @@ static void* clipboard_synthesize_image_bmp(wClipboard* clipboard, UINT32 format
|
||||
if (formatId == CF_DIB)
|
||||
{
|
||||
BYTE* pDst;
|
||||
BITMAPINFOHEADER* pInfoHeader;
|
||||
const BITMAPINFOHEADER* pInfoHeader;
|
||||
BITMAPFILEHEADER* pFileHeader;
|
||||
|
||||
if (SrcSize < sizeof(BITMAPINFOHEADER))
|
||||
@ -353,7 +353,7 @@ static void* clipboard_synthesize_html_format(wClipboard* clipboard, UINT32 form
|
||||
|
||||
if ((bom[0] == 0xFE) && (bom[1] == 0xFF))
|
||||
{
|
||||
ByteSwapUnicode((const WCHAR*)data, (int)(SrcSize / 2));
|
||||
ByteSwapUnicode((WCHAR*)data, (int)(SrcSize / 2));
|
||||
}
|
||||
|
||||
if ((bom[0] == 0xFF) && (bom[1] == 0xFE))
|
||||
|
@ -526,7 +526,7 @@ static const SecurityFunctionTableW* sspi_GetSecurityFunctionTableWByNameW(const
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static SecurityFunctionTableW* sspi_GetSecurityFunctionTableWByNameA(const SEC_CHAR* Name)
|
||||
static const SecurityFunctionTableW* sspi_GetSecurityFunctionTableWByNameA(const SEC_CHAR* Name)
|
||||
{
|
||||
int status;
|
||||
SEC_WCHAR* NameW = NULL;
|
||||
@ -829,7 +829,7 @@ static SECURITY_STATUS SEC_ENTRY winpr_ExportSecurityContext(PCtxtHandle phConte
|
||||
{
|
||||
SEC_CHAR* Name;
|
||||
SECURITY_STATUS status;
|
||||
SecurityFunctionTableW* table;
|
||||
const SecurityFunctionTableW* table;
|
||||
Name = (SEC_CHAR*)sspi_SecureHandleGetUpperPointer(phContext);
|
||||
|
||||
if (!Name)
|
||||
@ -895,7 +895,7 @@ static SECURITY_STATUS SEC_ENTRY winpr_ImportSecurityContextW(SEC_WCHAR* pszPack
|
||||
{
|
||||
SEC_CHAR* Name;
|
||||
SECURITY_STATUS status;
|
||||
SecurityFunctionTableW* table;
|
||||
const SecurityFunctionTableW* table;
|
||||
Name = (SEC_CHAR*)sspi_SecureHandleGetUpperPointer(phContext);
|
||||
|
||||
if (!Name)
|
||||
@ -1173,7 +1173,7 @@ static SECURITY_STATUS SEC_ENTRY winpr_ImpersonateSecurityContext(PCtxtHandle ph
|
||||
{
|
||||
SEC_CHAR* Name;
|
||||
SECURITY_STATUS status;
|
||||
SecurityFunctionTableW* table;
|
||||
const SecurityFunctionTableW* table;
|
||||
Name = (SEC_CHAR*)sspi_SecureHandleGetUpperPointer(phContext);
|
||||
|
||||
if (!Name)
|
||||
@ -1208,7 +1208,7 @@ static SECURITY_STATUS SEC_ENTRY winpr_InitializeSecurityContextW(
|
||||
{
|
||||
SEC_CHAR* Name;
|
||||
SECURITY_STATUS status;
|
||||
SecurityFunctionTableW* table;
|
||||
const SecurityFunctionTableW* table;
|
||||
Name = (SEC_CHAR*)sspi_SecureHandleGetUpperPointer(phCredential);
|
||||
|
||||
if (!Name)
|
||||
@ -1280,7 +1280,7 @@ static SECURITY_STATUS SEC_ENTRY winpr_QueryContextAttributesW(PCtxtHandle phCon
|
||||
{
|
||||
SEC_CHAR* Name;
|
||||
SECURITY_STATUS status;
|
||||
SecurityFunctionTableW* table;
|
||||
const SecurityFunctionTableW* table;
|
||||
Name = (SEC_CHAR*)sspi_SecureHandleGetUpperPointer(phContext);
|
||||
|
||||
if (!Name)
|
||||
@ -1346,7 +1346,7 @@ static SECURITY_STATUS SEC_ENTRY winpr_QuerySecurityContextToken(PCtxtHandle phC
|
||||
{
|
||||
SEC_CHAR* Name;
|
||||
SECURITY_STATUS status;
|
||||
SecurityFunctionTableW* table;
|
||||
const SecurityFunctionTableW* table;
|
||||
Name = (SEC_CHAR*)sspi_SecureHandleGetUpperPointer(phContext);
|
||||
|
||||
if (!Name)
|
||||
@ -1380,7 +1380,7 @@ static SECURITY_STATUS SEC_ENTRY winpr_SetContextAttributesW(PCtxtHandle phConte
|
||||
{
|
||||
SEC_CHAR* Name;
|
||||
SECURITY_STATUS status;
|
||||
SecurityFunctionTableW* table;
|
||||
const SecurityFunctionTableW* table;
|
||||
Name = (SEC_CHAR*)sspi_SecureHandleGetUpperPointer(phContext);
|
||||
|
||||
if (!Name)
|
||||
@ -1446,7 +1446,7 @@ static SECURITY_STATUS SEC_ENTRY winpr_RevertSecurityContext(PCtxtHandle phConte
|
||||
{
|
||||
SEC_CHAR* Name;
|
||||
SECURITY_STATUS status;
|
||||
SecurityFunctionTableW* table;
|
||||
const SecurityFunctionTableW* table;
|
||||
Name = (SEC_CHAR*)sspi_SecureHandleGetUpperPointer(phContext);
|
||||
|
||||
if (!Name)
|
||||
|
@ -93,8 +93,8 @@ LPSTR* CommandLineToArgvA(LPCSTR lpCmdLine, int* pNumArgs)
|
||||
{
|
||||
const char* p;
|
||||
size_t length;
|
||||
char* pBeg;
|
||||
char* pEnd;
|
||||
const char* pBeg;
|
||||
const char* pEnd;
|
||||
char* buffer;
|
||||
char* pOutput;
|
||||
int numArgs = 0;
|
||||
|
@ -88,7 +88,7 @@ BOOL WLog_Layout_GetMessagePrefix(wLog* log, wLogLayout* layout, wLogMessage* me
|
||||
{
|
||||
if ((p[0] == 'l') && (p[1] == 'v')) /* log level */
|
||||
{
|
||||
args[argc++] = (const void*)WLOG_LEVELS[message->Level];
|
||||
args[argc++] = (void*)WLOG_LEVELS[message->Level];
|
||||
format[index++] = '%';
|
||||
format[index++] = 's';
|
||||
p++;
|
||||
@ -120,7 +120,7 @@ BOOL WLog_Layout_GetMessagePrefix(wLog* log, wLogLayout* layout, wLogMessage* me
|
||||
}
|
||||
else if ((p[0] == 'f') && (p[1] == 'n')) /* function */
|
||||
{
|
||||
args[argc++] = (const void*)message->FunctionName;
|
||||
args[argc++] = (void*)message->FunctionName;
|
||||
format[index++] = '%';
|
||||
format[index++] = 's';
|
||||
p++;
|
||||
|
@ -791,7 +791,7 @@ LONG WLog_GetFilterLogLevel(wLog* log)
|
||||
return log->FilterLevel;
|
||||
}
|
||||
|
||||
static BOOL WLog_ParseName(wLog* log, LPSTR name)
|
||||
static BOOL WLog_ParseName(wLog* log, LPCSTR name)
|
||||
{
|
||||
char* p;
|
||||
size_t count;
|
||||
|
@ -1161,7 +1161,7 @@ int _select(int nfds, fd_set* readfds, fd_set* writefds, fd_set* exceptfds,
|
||||
|
||||
do
|
||||
{
|
||||
status = select(nfds, readfds, writefds, exceptfds, (const struct timeval*)timeout);
|
||||
status = select(nfds, readfds, writefds, exceptfds, (struct timeval*)timeout);
|
||||
} while ((status < 0) && (errno == EINTR));
|
||||
|
||||
return status;
|
||||
|
Loading…
Reference in New Issue
Block a user