From 6531bedcdbb974f3e98919ee7d2fc177b41faed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= Date: Fri, 19 Aug 2022 08:19:35 +0200 Subject: [PATCH] spa: add SPA_WARN_UNUSED_RESULT --- spa/include/spa/utils/defs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spa/include/spa/utils/defs.h b/spa/include/spa/utils/defs.h index 98f4555f6..cf15cc244 100644 --- a/spa/include/spa/utils/defs.h +++ b/spa/include/spa/utils/defs.h @@ -215,6 +215,7 @@ struct spa_fraction { #define SPA_SENTINEL __attribute__((__sentinel__)) #define SPA_UNUSED __attribute__ ((unused)) #define SPA_NORETURN __attribute__ ((noreturn)) +#define SPA_WARN_UNUSED_RESULT __attribute__ ((warn_unused_result)) #else #define SPA_PRINTF_FUNC(fmt, arg1) #define SPA_FORMAT_ARG_FUNC(arg1) @@ -224,6 +225,7 @@ struct spa_fraction { #define SPA_SENTINEL #define SPA_UNUSED #define SPA_NORETURN +#define SPA_WARN_UNUSED_RESULT #endif #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L