Silence warnings about unused return value

This macro is not used inside the library yet, but may be used in deprecated
functions in the future, if a function returning void has to change to
returning an error. It may also be useful in user code, so it is in a public
header.

Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/include/mbedtls/platform_util.h b/include/mbedtls/platform_util.h
index e1f063c..0882dc6 100644
--- a/include/mbedtls/platform_util.h
+++ b/include/mbedtls/platform_util.h
@@ -129,6 +129,13 @@
  */
 #define MBEDTLS_CHECK_RETURN_OPTIONAL
 
+/** \def MBEDTLS_IGNORE_RETURN
+ *
+ * Silences warning about unused return value given by functions
+ * with \c MBEDTLS_CHECK_RETURN attribute.
+ */
+#define MBEDTLS_IGNORE_RETURN(result) if( result ) {}
+
 /**
  * \brief       Securely zeroize a buffer
  *