mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-21 07:15:40 -04:00
Misc: clang-cl warning clean-up
This commit is contained in:
@ -188,7 +188,8 @@ static ALWAYS_INLINE void FormatLogMessageAndPrintW(const char* channelName, con
|
||||
char* message_buf = buf;
|
||||
int message_len;
|
||||
if ((message_len = FormatLogMessageForDisplay(message_buf, sizeof(buf), channelName, functionName, level, message,
|
||||
timestamp, ansi_color_code, newline)) > (sizeof(buf) - 1))
|
||||
timestamp, ansi_color_code, newline)) >
|
||||
static_cast<int>(sizeof(buf) - 1))
|
||||
{
|
||||
message_buf = static_cast<char*>(std::malloc(message_len + 1));
|
||||
message_len = FormatLogMessageForDisplay(message_buf, message_len + 1, channelName, functionName, level, message,
|
||||
@ -201,8 +202,8 @@ static ALWAYS_INLINE void FormatLogMessageAndPrintW(const char* channelName, con
|
||||
// anyway...
|
||||
wchar_t wbuf[512];
|
||||
wchar_t* wmessage_buf = wbuf;
|
||||
int wmessage_buflen = countof(wbuf) - 1;
|
||||
if (message_len >= countof(wbuf))
|
||||
int wmessage_buflen = static_cast<int>(std::size(wbuf) - 1);
|
||||
if (message_len >= static_cast<int>(std::size(wbuf)))
|
||||
{
|
||||
wmessage_buflen = message_len;
|
||||
wmessage_buf = static_cast<wchar_t*>(std::malloc((wmessage_buflen + 1) * sizeof(wchar_t)));
|
||||
|
Reference in New Issue
Block a user