From 1ac436f31e219fedf4355a1429b0ff82ed100e23 Mon Sep 17 00:00:00 2001 From: Jiajie Hu Date: Mon, 24 Jul 2017 10:17:28 +0800 Subject: [PATCH] buffer: remove a wrongly added attribute specifier MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It doesn't seem to make much sense to have the mentioned typedef declaration equipped with NODE_EXTERN. In fact, when compiling with GCC, an attribute specifier like __attribute__((visibility("default"))) in such a typedef declaration will cause the following warning message: warning: ‘visibility’ attribute ignored [-Wattributes] The issue goes unnoticed because NODE_EXTERN is defined as nothing for GCC builds, but for correctness it's better to not specify it here at all. PR-URL: https://github.com/nodejs/node/pull/14466 Reviewed-By: Refael Ackermann Reviewed-By: Trevor Norris --- src/node_buffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_buffer.h b/src/node_buffer.h index 686450d984e6f9..29e936fa7ad534 100644 --- a/src/node_buffer.h +++ b/src/node_buffer.h @@ -13,7 +13,7 @@ namespace Buffer { static const unsigned int kMaxLength = sizeof(int32_t) == sizeof(intptr_t) ? 0x3fffffff : 0x7fffffff; -NODE_EXTERN typedef void (*FreeCallback)(char* data, void* hint); +typedef void (*FreeCallback)(char* data, void* hint); NODE_EXTERN bool HasInstance(v8::Local val); NODE_EXTERN bool HasInstance(v8::Local val);