diff options
-rw-r--r-- | src/vmime/platforms/posix/posixSocket.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/vmime/platforms/posix/posixSocket.cpp b/src/vmime/platforms/posix/posixSocket.cpp index aec6a83e..c0ce0cfa 100644 --- a/src/vmime/platforms/posix/posixSocket.cpp +++ b/src/vmime/platforms/posix/posixSocket.cpp @@ -64,14 +64,20 @@ namespace { -char* vmime_strerror_r_result(int /* res */, char* buf) { +#ifdef __GNUC__ +# define GNU_UNUSED [[gnu::unused]] +#else +# define GNU_UNUSED +#endif + +GNU_UNUSED char* vmime_strerror_r_result(int /* res */, char* buf) { // XSI-compliant prototype: // int strerror_r(int errnum, char *buf, size_t buflen); return buf; } -char* vmime_strerror_r_result(char* res, char* /* buf */) { +GNU_UNUSED char* vmime_strerror_r_result(char* res, char* /* buf */) { // GNU-specific prototype: // char *strerror_r(int errnum, char *buf, size_t buflen); |