mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-08 17:42:09 +03:00
Fix GCC format-signedness warnings
Signed-off-by: Kenneth Soerensen <knnthsrnsn@gmail.com>
This commit is contained in:
@@ -112,7 +112,7 @@ int main( void )
|
||||
mbedtls_printf( "FAILED: %s\n", tmp );
|
||||
#else
|
||||
#define PRINT_ERROR \
|
||||
mbedtls_printf( "FAILED: -0x%04x\n", -ret );
|
||||
mbedtls_printf( "FAILED: -0x%04x\n", (unsigned int) -ret );
|
||||
#endif
|
||||
|
||||
#define TIME_AND_TSC( TITLE, CODE ) \
|
||||
|
@@ -456,7 +456,7 @@ static int ctx_buffer_append( ctx_buffer *buf,
|
||||
{
|
||||
if( ( ret = ctx_buffer_flush( buf ) ) <= 0 )
|
||||
{
|
||||
mbedtls_printf( "ctx_buffer_flush failed with -%#04x", -ret );
|
||||
mbedtls_printf( "ctx_buffer_flush failed with -%#04x", (unsigned int) -ret );
|
||||
return( ret );
|
||||
}
|
||||
}
|
||||
@@ -495,7 +495,7 @@ static int dispatch_data( mbedtls_net_context *ctx,
|
||||
ret = mbedtls_net_send( ctx, data, len );
|
||||
if( ret < 0 )
|
||||
{
|
||||
mbedtls_printf( "net_send returned -%#04x\n", -ret );
|
||||
mbedtls_printf( "net_send returned -%#04x\n", (unsigned int) -ret );
|
||||
}
|
||||
return( ret );
|
||||
}
|
||||
@@ -999,7 +999,7 @@ exit:
|
||||
{
|
||||
char error_buf[100];
|
||||
mbedtls_strerror( ret, error_buf, 100 );
|
||||
mbedtls_printf( "Last error was: -0x%04X - %s\n\n", - ret, error_buf );
|
||||
mbedtls_printf( "Last error was: -0x%04X - %s\n\n", (unsigned int) -ret, error_buf );
|
||||
fflush( stdout );
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user