sunos: disable __attribute__((unused))

The Studio compiler prints out a warning when this attribute is used
because it does not support it (at least as of the latest 12.6 version):
https://docs.oracle.com/cd/E77782_01/html/E77788/gjzke.html#scrolltoc

PR-URL: https://github.com/libuv/libuv/pull/2200
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
Andrew Paprocki 2019-02-21 10:18:06 -05:00 committed by cjihrig
parent bdf9a96afa
commit f62240b2d1
No known key found for this signature in database
GPG Key ID: 7434390BDBE9B9C5
2 changed files with 2 additions and 4 deletions

View File

@ -95,8 +95,7 @@ int uv__pthread_sigmask(int how, const sigset_t* set, sigset_t* oset);
*/
#if defined(__clang__) || \
defined(__GNUC__) || \
defined(__INTEL_COMPILER) || \
defined(__SUNPRO_C)
defined(__INTEL_COMPILER)
# define UV_DESTRUCTOR(declaration) __attribute__((destructor)) declaration
# define UV_UNUSED(declaration) __attribute__((unused)) declaration
#else

View File

@ -174,8 +174,7 @@ extern int snprintf(char*, size_t, const char*, ...);
#if defined(__clang__) || \
defined(__GNUC__) || \
defined(__INTEL_COMPILER) || \
defined(__SUNPRO_C)
defined(__INTEL_COMPILER)
# define UNUSED __attribute__((unused))
#else
# define UNUSED