From ecffd96910ab27afbc1b82721d2c04b37194898e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Fri, 14 Jan 2022 13:06:14 +0100 Subject: [PATCH] Silence compiler warning in example program MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Manuel Pégourié-Gonnard --- programs/psa/aead_cipher_psa.c | 2 +- programs/psa/hmac_md_psa.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 )