mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Tier1: fix type demotion warning
Promote type to signed size type.
This commit is contained in:
parent
eae0d0964b
commit
a2ceab52da
@ -25,7 +25,7 @@
|
|||||||
#define FmtStrVSNPrintf( szBuf, nBufSize, bQuietTruncation, ppszFormat, nPrevLen, lastArg ) \
|
#define FmtStrVSNPrintf( szBuf, nBufSize, bQuietTruncation, ppszFormat, nPrevLen, lastArg ) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
int result; \
|
ssize_t result; \
|
||||||
va_list arg_ptr; \
|
va_list arg_ptr; \
|
||||||
bool bTruncated = false; \
|
bool bTruncated = false; \
|
||||||
static int scAsserted = 0; \
|
static int scAsserted = 0; \
|
||||||
|
@ -81,7 +81,7 @@ inline bool V_iswdigit(int c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void V_binarytohex(const byte* in, size_t inputbytes, char* out, size_t outsize);
|
void V_binarytohex(const byte* in, size_t inputbytes, char* out, size_t outsize);
|
||||||
int V_vsnprintfRet(char* pDest, int maxLen, const char* pFormat, va_list params, bool* pbTruncated);
|
ssize_t V_vsnprintfRet(char* pDest, size_t maxLen, const char* pFormat, va_list params, bool* pbTruncated);
|
||||||
|
|
||||||
// Strip white space at the beginning and end of a string
|
// Strip white space at the beginning and end of a string
|
||||||
ssize_t V_StrTrim(char* pStr);
|
ssize_t V_StrTrim(char* pStr);
|
||||||
|
@ -266,12 +266,12 @@ void V_binarytohex(const byte* in, size_t inputbytes, char* out, size_t outsize)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int V_vsnprintfRet(char* pDest, int maxLen, const char* pFormat, va_list params, bool* pbTruncated)
|
ssize_t V_vsnprintfRet(char* pDest, size_t maxLen, const char* pFormat, va_list params, bool* pbTruncated)
|
||||||
{
|
{
|
||||||
Assert(maxLen > 0);
|
Assert(maxLen > 0);
|
||||||
|
|
||||||
int len = _vsnprintf(pDest, maxLen, pFormat, params);
|
ssize_t len = _vsnprintf(pDest, maxLen, pFormat, params);
|
||||||
bool bTruncated = (len < 0) || (len >= maxLen);
|
const bool bTruncated = (len < 0) || (len >= (ssize_t)maxLen);
|
||||||
|
|
||||||
if (pbTruncated)
|
if (pbTruncated)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user