From e5cceb0862a5b8e55a043f66af8a8c8648a8e7de 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. --- 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 799d05a7aa6193..acf9b23c3b3256 100644 --- a/src/node_buffer.h +++ b/src/node_buffer.h @@ -34,7 +34,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);