mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 10:42:36 +01:00
Merge pull request #246 from Blaypeg/master
Explicit conversion to avoid compiler warning (2)
This commit is contained in:
commit
4f63f57d26
@ -14,8 +14,8 @@ std::string fmt::FormatV(const char *fmt, va_list args)
|
||||
for (;;)
|
||||
{
|
||||
std::vector<char> buffptr(length);
|
||||
int printlen = vsnprintf(buffptr.data(), length, fmt, args);
|
||||
if (printlen >= 0 && printlen < length)
|
||||
size_t printlen = vsnprintf(buffptr.data(), length, fmt, args);
|
||||
if (printlen < length)
|
||||
{
|
||||
str = std::string(buffptr.data(), printlen);
|
||||
break;
|
||||
|
@ -86,9 +86,9 @@ namespace fmt{
|
||||
std::vector<char> buffptr(length);
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wformat-security"
|
||||
int printlen = snprintf(buffptr.data(), length, fmt.c_str(), std::forward<Args>(parameters)...);
|
||||
size_t printlen = snprintf(buffptr.data(), length, fmt.c_str(), std::forward<Args>(parameters)...);
|
||||
#pragma clang diagnostic pop
|
||||
if (printlen >= 0 && printlen < length)
|
||||
if (printlen < length)
|
||||
{
|
||||
str = string(buffptr.data(), printlen);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user