Fixed compiler warnings #5210

This commit is contained in:
Armin Novak 2019-01-29 16:14:55 +01:00
parent 03ec36440d
commit 9d680904cc
2 changed files with 6 additions and 4 deletions

View File

@ -29,8 +29,8 @@ typedef struct rdp_assistance_file rdpAssistanceFile;
extern "C" {
#endif
FREERDP_API BYTE* freerdp_assistance_hex_string_to_bin(const char* str, size_t* size);
FREERDP_API char* freerdp_assistance_bin_to_hex_string(const BYTE* data, size_t size);
FREERDP_API BYTE* freerdp_assistance_hex_string_to_bin(const void* str, size_t* size);
FREERDP_API char* freerdp_assistance_bin_to_hex_string(const void* data, size_t size);
FREERDP_API char* freerdp_assistance_generate_pass_stub(DWORD flags);
FREERDP_API char* freerdp_assistance_construct_expert_blob(const char* name, const char* pass);

View File

@ -664,11 +664,12 @@ fail:
return rc;
}
BYTE* freerdp_assistance_hex_string_to_bin(const char* str, size_t* size)
BYTE* freerdp_assistance_hex_string_to_bin(const void* raw, size_t* size)
{
size_t length;
BYTE* buffer;
size_t i;
const char* str = (const char*)raw;
length = strlen(str);
if ((length % 2) != 0)
@ -710,11 +711,12 @@ BYTE* freerdp_assistance_hex_string_to_bin(const char* str, size_t* size)
return buffer;
}
char* freerdp_assistance_bin_to_hex_string(const BYTE* data, size_t size)
char* freerdp_assistance_bin_to_hex_string(const void* raw, size_t size)
{
size_t i;
char* p;
int ln, hn;
const char* data = (const char*)raw;
char bin2hex[] = "0123456789ABCDEF";
p = (char*) calloc((size + 1), 2);