Minor warning fix.

This commit is contained in:
Martín Lucas Golini
2024-01-06 01:26:02 -03:00
parent fbac4f7d4d
commit 748ead4a97
4 changed files with 15 additions and 20 deletions

View File

@@ -70,9 +70,9 @@ void eePRINT( const char* format, ... ) {
va_list args;
while ( 1 ) {
va_start( args, format );
va_start( args, format );
while ( 1 ) {
n = vsnprintf( &buf[0], buf.size(), format, args );
if ( n > -1 && n < size ) {
@@ -100,9 +100,9 @@ void eePRINTL( const char* format, ... ) {
va_list args;
while ( 1 ) {
va_start( args, format );
va_start( args, format );
while ( 1 ) {
n = vsnprintf( &buf[0], buf.size(), format, args );
if ( n > -1 && n < size ) {
@@ -133,9 +133,9 @@ void eePRINTC( unsigned int cond, const char* format, ... ) {
va_list args;
while ( 1 ) {
va_start( args, format );
va_start( args, format );
while ( 1 ) {
n = vsnprintf( &buf[0], buf.size(), format, args );
if ( n > -1 && n < size ) {

View File

@@ -923,9 +923,9 @@ std::string String::format( const char* format, ... ) {
va_list args;
while ( 1 ) {
va_start( args, format );
va_start( args, format );
while ( 1 ) {
n = vsnprintf( &tstr[0], size, format, args );
if ( n > -1 && n < size ) {

View File

@@ -242,9 +242,9 @@ void Log::writef( const char* format, ... ) {
va_list args;
while ( 1 ) {
va_start( args, format );
va_start( args, format );
while ( 1 ) {
n = vsnprintf( &tstr[0], size, format, args );
if ( n > -1 && n < size ) {
@@ -301,22 +301,17 @@ void Log::writef( const LogLevel& level, const char* format, ... ) {
int n, size = 256;
std::string tstr( size, '\0' );
bool first = true;
va_list args;
while ( 1 ) {
va_start( args, format );
va_start( args, format );
while ( 1 ) {
n = vsnprintf( &tstr[0], size, format, args );
if ( n > -1 && n < size ) {
tstr.resize( n );
tstr += '\n';
if ( first ) {
tstr = logLevelWithTimestamp( level, tstr, false );
first = false;
}
tstr = logLevelWithTimestamp( level, tstr, false );
if ( mKeepLog ) {
lock();

View File

@@ -1429,9 +1429,9 @@ void UIConsole::pushText( const char* format, ... ) {
va_list args;
while ( 1 ) {
va_start( args, format );
va_start( args, format );
while ( 1 ) {
n = vsnprintf( &tstr[0], size, format, args );
if ( n > -1 && n < size ) {