From f62240b2d1a0e0161964f4026a889acf50560db6 Mon Sep 17 00:00:00 2001 From: Andrew Paprocki Date: Thu, 21 Feb 2019 10:18:06 -0500 Subject: [PATCH] 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 --- src/unix/internal.h | 3 +-- test/task.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/unix/internal.h b/src/unix/internal.h index 7729ab8d..a0846970 100644 --- a/src/unix/internal.h +++ b/src/unix/internal.h @@ -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 diff --git a/test/task.h b/test/task.h index 282c02d5..8462e0dd 100644 --- a/test/task.h +++ b/test/task.h @@ -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