diff --git a/programs/psa/aead_cipher_psa.c b/programs/psa/aead_cipher_psa.c index 301701c18..ef73e7a2e 100644 --- a/programs/psa/aead_cipher_psa.c +++ b/programs/psa/aead_cipher_psa.c @@ -88,7 +88,7 @@ void print_out( const char *title, unsigned char *out, size_t len ) do { \ ret = code; \ if( ret != 0 ) { \ - printf( "%s:%03d: ret = -0x%04x\n", __func__, __LINE__, -ret ); \ + printf( "%s:%03d: ret = -0x%04x\n", __func__, __LINE__, (unsigned) -ret ); \ goto exit; \ } \ } while( 0 ) diff --git a/programs/psa/hmac_md_psa.c b/programs/psa/hmac_md_psa.c index cde78f18b..0a9a02bbe 100644 --- a/programs/psa/hmac_md_psa.c +++ b/programs/psa/hmac_md_psa.c @@ -159,7 +159,7 @@ int main(void) printf( "MD\n" ); int ret = md(); if( ret != 0 ) - printf( "ret = %d (-0x%04x)\n", ret, -ret ); + printf( "ret = %d (-0x%04x)\n", ret, (unsigned) -ret ); psa_status_t status = psa_crypto_init(); if( status != PSA_SUCCESS )