Skip to content
Snippets Groups Projects
Commit c6e497ea authored by Patrick Farrell's avatar Patrick Farrell Committed by Andy Green
Browse files

Add warn_unused_result check, attribute only supported by GCC 3.4 or later

warn_unused_result was introduced in GCC version 3.4.

Change-Id: I6c2cc938d2b868ddfe0889cc41d7fa9d70e1b907
parent 96487167
Branches
No related tags found
No related merge requests found
...@@ -168,8 +168,15 @@ struct sockaddr_in; ...@@ -168,8 +168,15 @@ struct sockaddr_in;
#endif #endif
#if defined(__GNUC__) #if defined(__GNUC__)
/* warn_unused_result attribute only supported by GCC 3.4 or later */
#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#define LWS_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
#define LWS_WARN_UNUSED_RESULT
#endif
#define LWS_VISIBLE __attribute__((visibility("default"))) #define LWS_VISIBLE __attribute__((visibility("default")))
#define LWS_WARN_UNUSED_RESULT __attribute__ ((warn_unused_result))
#define LWS_WARN_DEPRECATED __attribute__ ((deprecated)) #define LWS_WARN_DEPRECATED __attribute__ ((deprecated))
#else #else
#define LWS_VISIBLE #define LWS_VISIBLE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment