From db065433cf48b8bf2c23096d091852ddf3420906 Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Tue, 17 Nov 2020 16:43:59 -0800 Subject: [PATCH] benchmark: fix build warnings The napi/* benchmarks were using an incorrect signature for the V8 add-on init function. This was causing a warning. Signed-off-by: Gabriel Schulhof PR-URL: https://github.com/nodejs/node/pull/36157 Reviewed-By: James M Snell Reviewed-By: Rich Trott Reviewed-By: Luigi Pinca Reviewed-By: Richard Lau --- benchmark/napi/function_args/binding.cc | 4 +++- benchmark/napi/function_call/binding.cc | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/benchmark/napi/function_args/binding.cc b/benchmark/napi/function_args/binding.cc index 2c54dd424d405d..078fe0ee3ea767 100644 --- a/benchmark/napi/function_args/binding.cc +++ b/benchmark/napi/function_args/binding.cc @@ -123,7 +123,9 @@ void CallWithArguments(const FunctionCallbackInfo& args) { } } -void Initialize(Local target) { +void Initialize(Local target, + Local module, + void* data) { NODE_SET_METHOD(target, "callWithString", CallWithString); NODE_SET_METHOD(target, "callWithLongString", CallWithString); diff --git a/benchmark/napi/function_call/binding.cc b/benchmark/napi/function_call/binding.cc index 289a94ac3ecc88..570f96f41ec458 100644 --- a/benchmark/napi/function_call/binding.cc +++ b/benchmark/napi/function_call/binding.cc @@ -7,7 +7,9 @@ void Hello(const v8::FunctionCallbackInfo& args) { args.GetReturnValue().Set(c++); } -void Initialize(v8::Local target) { +void Initialize(v8::Local target, + v8::Local module, + void* data) { NODE_SET_METHOD(target, "hello", Hello); }