From 6b5c0f0e441ee62ca6f670b045e0074c874996a8 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 23 Sep 2021 17:43:46 +0200 Subject: [PATCH] Better default for MBEDTLS_CHECK_RETURN in config.h An empty expansion is possible, but as documented its effect is to disable the feature, so that isn't a good example. Instead, use the GCC implementation as the default: it's plausible that it could work even on compilers that don't advertise themselves as sufficiently GCC-like to define __GNUC__, and if not it gives users a concrete idea of what the macro is supposed to do. Signed-off-by: Gilles Peskine --- include/mbedtls/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h index d2357dc0f..40b20bd9d 100644 --- a/include/mbedtls/config.h +++ b/include/mbedtls/config.h @@ -3708,7 +3708,7 @@ * If the implementation here is empty, this will effectively disable the * checking of functions' return values. */ -//#define MBEDTLS_CHECK_RETURN +//#define MBEDTLS_CHECK_RETURN __attribute__(__warn_unused_result__) /* PSA options */ /**