[winpr,print] use void* as arguments for dump functions

to avoid casting or type mismatch warnings use void* as pointer to data
for dump functions
This commit is contained in:
Armin Novak 2023-05-17 13:59:01 +02:00 committed by Martin Fleisz
parent d684acb0a3
commit 10f8a7b4e4
2 changed files with 6 additions and 6 deletions

View File

@ -35,9 +35,9 @@ extern "C"
{
#endif
WINPR_API void winpr_HexDump(const char* tag, UINT32 lvl, const BYTE* data, size_t length);
WINPR_API void winpr_HexLogDump(wLog* log, UINT32 lvl, const BYTE* data, size_t length);
WINPR_API void winpr_CArrayDump(const char* tag, UINT32 lvl, const BYTE* data, size_t length,
WINPR_API void winpr_HexDump(const char* tag, UINT32 lvl, const void* data, size_t length);
WINPR_API void winpr_HexLogDump(wLog* log, UINT32 lvl, const void* data, size_t length);
WINPR_API void winpr_CArrayDump(const char* tag, UINT32 lvl, const void* data, size_t length,
size_t width);
WINPR_API char* winpr_BinToHexString(const BYTE* data, size_t length, BOOL space);

View File

@ -33,13 +33,13 @@
#define MIN(a, b) (a) < (b) ? (a) : (b)
#endif
void winpr_HexDump(const char* tag, UINT32 level, const BYTE* data, size_t length)
void winpr_HexDump(const char* tag, UINT32 level, const void* data, size_t length)
{
wLog* log = WLog_Get(tag);
winpr_HexLogDump(log, level, data, length);
}
void winpr_HexLogDump(wLog* log, UINT32 lvl, const BYTE* data, size_t length)
void winpr_HexLogDump(wLog* log, UINT32 lvl, const void* data, size_t length)
{
const BYTE* p = data;
size_t i, line, offset = 0;
@ -127,7 +127,7 @@ fail:
free(buffer);
}
void winpr_CArrayDump(const char* tag, UINT32 level, const BYTE* data, size_t length, size_t width)
void winpr_CArrayDump(const char* tag, UINT32 level, const void* data, size_t length, size_t width)
{
const BYTE* p = data;
size_t i, offset = 0;