diff options
Diffstat (limited to 'src/attributes.h')
-rw-r--r-- | src/attributes.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/attributes.h b/src/attributes.h index 684ee27..578dd2c 100644 --- a/src/attributes.h +++ b/src/attributes.h @@ -13,4 +13,11 @@ # define PUGL_UNUSED(name) name #endif +// Unused result macro to warn when an important return status is ignored +#ifndef _MSC_VER +# define PUGL_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define PUGL_WARN_UNUSED_RESULT +#endif + #endif // PUGL_SRC_ATTRIBUTES_H |