From 276720921ba8b4428d3832867e8c6474156a75d1 Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Tue, 9 May 2017 13:53:29 +0300 Subject: [PATCH] addons: remove semicolons from after module definition Having semicolons there runs counter to our documentation and illicits warnings in pedantic mode. This removes semicolons from after uses of NODE_MODULE and NODE_MODULE_CONTEXT_AWARE_BUILTIN. PR-URL: https://github.com/nodejs/node/pull/12919 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Daniel Bevenius Reviewed-By: Alexey Orlenko --- benchmark/misc/function_call/binding.cc | 2 +- doc/api/addons.md | 2 +- src/node.cc | 2 +- src/node_contextify.cc | 2 +- test/addons/async-hello-world/binding.cc | 2 +- test/addons/at-exit/binding.cc | 2 +- test/addons/buffer-free-callback/binding.cc | 2 +- test/addons/hello-world-function-export/binding.cc | 2 +- test/addons/hello-world/binding.cc | 2 +- test/addons/load-long-path/binding.cc | 2 +- test/addons/null-buffer-neuter/binding.cc | 2 +- test/addons/parse-encoding/binding.cc | 2 +- test/addons/repl-domain-abort/binding.cc | 2 +- test/addons/stringbytes-external-exceed-max/binding.cc | 2 +- test/addons/symlinked-module/binding.cc | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/benchmark/misc/function_call/binding.cc b/benchmark/misc/function_call/binding.cc index c6718e8e33adcc..9008f6c437052a 100644 --- a/benchmark/misc/function_call/binding.cc +++ b/benchmark/misc/function_call/binding.cc @@ -14,4 +14,4 @@ extern "C" void init (Local target) { NODE_SET_METHOD(target, "hello", Hello); } -NODE_MODULE(binding, init); +NODE_MODULE(binding, init) diff --git a/doc/api/addons.md b/doc/api/addons.md index 1799cf7e5d4694..772c3c77645869 100644 --- a/doc/api/addons.md +++ b/doc/api/addons.md @@ -1116,7 +1116,7 @@ void init(Local exports) { AtExit(at_exit_cb1, exports->GetIsolate()); } -NODE_MODULE(addon, init); +NODE_MODULE(addon, init) } // namespace demo ``` diff --git a/src/node.cc b/src/node.cc index 770c68d57520d6..cae9d2a893cb68 100644 --- a/src/node.cc +++ b/src/node.cc @@ -4618,5 +4618,5 @@ int Start(int argc, char** argv) { #if !HAVE_INSPECTOR static void InitEmptyBindings() {} -NODE_MODULE_CONTEXT_AWARE_BUILTIN(inspector, InitEmptyBindings); +NODE_MODULE_CONTEXT_AWARE_BUILTIN(inspector, InitEmptyBindings) #endif // !HAVE_INSPECTOR diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 4511907c213d2d..970455bb25cb2e 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -1033,4 +1033,4 @@ void InitContextify(Local target, } // anonymous namespace } // namespace node -NODE_MODULE_CONTEXT_AWARE_BUILTIN(contextify, node::InitContextify); +NODE_MODULE_CONTEXT_AWARE_BUILTIN(contextify, node::InitContextify) diff --git a/test/addons/async-hello-world/binding.cc b/test/addons/async-hello-world/binding.cc index e6033fc4fd420c..70fee63aa5e648 100644 --- a/test/addons/async-hello-world/binding.cc +++ b/test/addons/async-hello-world/binding.cc @@ -77,4 +77,4 @@ void init(v8::Local exports, v8::Local module) { NODE_SET_METHOD(module, "exports", Method); } -NODE_MODULE(binding, init); +NODE_MODULE(binding, init) diff --git a/test/addons/at-exit/binding.cc b/test/addons/at-exit/binding.cc index 8f9d0b461c767e..c9b26a348ad8fe 100644 --- a/test/addons/at-exit/binding.cc +++ b/test/addons/at-exit/binding.cc @@ -40,4 +40,4 @@ void init(Local exports) { atexit(sanity_check); } -NODE_MODULE(binding, init); +NODE_MODULE(binding, init) diff --git a/test/addons/buffer-free-callback/binding.cc b/test/addons/buffer-free-callback/binding.cc index 5c95f594e74fb7..24b5dea6025db6 100644 --- a/test/addons/buffer-free-callback/binding.cc +++ b/test/addons/buffer-free-callback/binding.cc @@ -41,4 +41,4 @@ void init(v8::Local exports) { NODE_SET_METHOD(exports, "check", Check); } -NODE_MODULE(binding, init); +NODE_MODULE(binding, init) diff --git a/test/addons/hello-world-function-export/binding.cc b/test/addons/hello-world-function-export/binding.cc index fa2cbc59a07eed..c113e0489bde0e 100644 --- a/test/addons/hello-world-function-export/binding.cc +++ b/test/addons/hello-world-function-export/binding.cc @@ -11,4 +11,4 @@ void init(v8::Local exports, v8::Local module) { NODE_SET_METHOD(module, "exports", Method); } -NODE_MODULE(binding, init); +NODE_MODULE(binding, init) diff --git a/test/addons/hello-world/binding.cc b/test/addons/hello-world/binding.cc index 8a8145f01618d2..5651dc8f50a317 100644 --- a/test/addons/hello-world/binding.cc +++ b/test/addons/hello-world/binding.cc @@ -11,4 +11,4 @@ void init(v8::Local exports) { NODE_SET_METHOD(exports, "hello", Method); } -NODE_MODULE(binding, init); +NODE_MODULE(binding, init) diff --git a/test/addons/load-long-path/binding.cc b/test/addons/load-long-path/binding.cc index 1cdcb4c200f488..83823ae8363cd9 100644 --- a/test/addons/load-long-path/binding.cc +++ b/test/addons/load-long-path/binding.cc @@ -10,4 +10,4 @@ void init(v8::Local exports) { NODE_SET_METHOD(exports, "hello", Method); } -NODE_MODULE(binding, init); +NODE_MODULE(binding, init) diff --git a/test/addons/null-buffer-neuter/binding.cc b/test/addons/null-buffer-neuter/binding.cc index d0f26d4cc50222..0d3d850304d534 100644 --- a/test/addons/null-buffer-neuter/binding.cc +++ b/test/addons/null-buffer-neuter/binding.cc @@ -38,4 +38,4 @@ void init(v8::Local exports) { NODE_SET_METHOD(exports, "run", Run); } -NODE_MODULE(binding, init); +NODE_MODULE(binding, init) diff --git a/test/addons/parse-encoding/binding.cc b/test/addons/parse-encoding/binding.cc index 5c56d97fc6ac98..65dba5b6734dea 100644 --- a/test/addons/parse-encoding/binding.cc +++ b/test/addons/parse-encoding/binding.cc @@ -35,4 +35,4 @@ void Initialize(v8::Local exports) { } // anonymous namespace -NODE_MODULE(binding, Initialize); +NODE_MODULE(binding, Initialize) diff --git a/test/addons/repl-domain-abort/binding.cc b/test/addons/repl-domain-abort/binding.cc index 7153a828a930e9..9363a16617382d 100644 --- a/test/addons/repl-domain-abort/binding.cc +++ b/test/addons/repl-domain-abort/binding.cc @@ -44,4 +44,4 @@ void init(Local exports) { NODE_SET_METHOD(exports, "method", Method); } -NODE_MODULE(binding, init); +NODE_MODULE(binding, init) diff --git a/test/addons/stringbytes-external-exceed-max/binding.cc b/test/addons/stringbytes-external-exceed-max/binding.cc index 03fa29f2737e0a..2141d2c5b948b4 100644 --- a/test/addons/stringbytes-external-exceed-max/binding.cc +++ b/test/addons/stringbytes-external-exceed-max/binding.cc @@ -21,4 +21,4 @@ void init(v8::Local exports) { NODE_SET_METHOD(exports, "ensureAllocation", EnsureAllocation); } -NODE_MODULE(binding, init); +NODE_MODULE(binding, init) diff --git a/test/addons/symlinked-module/binding.cc b/test/addons/symlinked-module/binding.cc index 1cdcb4c200f488..83823ae8363cd9 100644 --- a/test/addons/symlinked-module/binding.cc +++ b/test/addons/symlinked-module/binding.cc @@ -10,4 +10,4 @@ void init(v8::Local exports) { NODE_SET_METHOD(exports, "hello", Method); } -NODE_MODULE(binding, init); +NODE_MODULE(binding, init)