bnoordhuis / node-buffertools

working with node.js buffers made easy
ISC License
205 stars 35 forks source link

Compilation warnings with V8 shipped with latest node [10.13 LTS] #93

Open viktorku opened 6 years ago

viktorku commented 6 years ago

We should ideally fix these deprecations:

``` make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. ../buffertools.cc: In member function ‘v8::Local {anonymous}::FillAction::apply(v8::Local, const v8::FunctionCallbackInfo&, uint32_t)’: ../buffertools.cc:256:44: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations] int c = args[args_start]->Int32Value(); ^ In file included from /home/viktor/.node-gyp/10.13.0/include/node/v8.h:26:0, from /home/viktor/.node-gyp/10.13.0/include/node/node.h:63, from ../buffertools.cc:17: /home/viktor/.node-gyp/10.13.0/include/node/v8.h:2478:46: note: declared here V8_DEPRECATED("Use maybe version", int32_t Int32Value() const); ^ /home/viktor/.node-gyp/10.13.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^ ../buffertools.cc:261:43: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated: Use Isolate version [-Wdeprecated-declarations] String::Utf8Value s(args[args_start]); ^ In file included from /home/viktor/.node-gyp/10.13.0/include/node/v8.h:26:0, from /home/viktor/.node-gyp/10.13.0/include/node/node.h:63, from ../buffertools.cc:17: /home/viktor/.node-gyp/10.13.0/include/node/v8.h:2892:28: note: declared here explicit Utf8Value(Local obj)); ^ /home/viktor/.node-gyp/10.13.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^ ../buffertools.cc:266:56: warning: ‘v8::Local v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations] Local other = args[args_start]->ToObject(); ^ In file included from /home/viktor/.node-gyp/10.13.0/include/node/node.h:63:0, from ../buffertools.cc:17: /home/viktor/.node-gyp/10.13.0/include/node/v8.h:10046:15: note: declared here Local Value::ToObject() const { ^ ../buffertools.cc: In member function ‘v8::Local {anonymous}::IndexOfAction::apply(v8::Local, const uint8_t*, size_t, const v8::FunctionCallbackInfo&, uint32_t)’: ../buffertools.cc:329:54: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations] int32_t start = args[args_start + 1]->Int32Value(); ^ In file included from /home/viktor/.node-gyp/10.13.0/include/node/v8.h:26:0, from /home/viktor/.node-gyp/10.13.0/include/node/node.h:63, from ../buffertools.cc:17: /home/viktor/.node-gyp/10.13.0/include/node/v8.h:2478:46: note: declared here V8_DEPRECATED("Use maybe version", int32_t Int32Value() const); ^ /home/viktor/.node-gyp/10.13.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^ ../buffertools.cc: In function ‘void {anonymous}::Concat(const v8::FunctionCallbackInfo&)’: ../buffertools.cc:449:29: warning: ‘v8::Local v8::Value::ToString() const’ is deprecated: Use maybe version [-Wdeprecated-declarations] size += arg->ToString()->Utf8Length(); ^ In file included from /home/viktor/.node-gyp/10.13.0/include/node/node.h:63:0, from ../buffertools.cc:17: /home/viktor/.node-gyp/10.13.0/include/node/v8.h:10040:15: note: declared here Local Value::ToString() const { ^ ../buffertools.cc:449:43: warning: ‘int v8::String::Utf8Length() const’ is deprecated: Use Isolate version instead [-Wdeprecated-declarations] size += arg->ToString()->Utf8Length(); ^ In file included from /home/viktor/.node-gyp/10.13.0/include/node/v8.h:26:0, from /home/viktor/.node-gyp/10.13.0/include/node/node.h:63, from ../buffertools.cc:17: /home/viktor/.node-gyp/10.13.0/include/node/v8.h:2587:52: note: declared here V8_DEPRECATED("Use Isolate version instead", int Utf8Length() const); ^ /home/viktor/.node-gyp/10.13.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^ ../buffertools.cc:452:50: warning: ‘v8::Local v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations] size += node::Buffer::Length(arg->ToObject()); ^ In file included from /home/viktor/.node-gyp/10.13.0/include/node/node.h:63:0, from ../buffertools.cc:17: /home/viktor/.node-gyp/10.13.0/include/node/v8.h:10046:15: note: declared here Local Value::ToObject() const { ^ ../buffertools.cc:470:30: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated: Use Isolate version [-Wdeprecated-declarations] String::Utf8Value v(arg); ^ In file included from /home/viktor/.node-gyp/10.13.0/include/node/v8.h:26:0, from /home/viktor/.node-gyp/10.13.0/include/node/node.h:63, from ../buffertools.cc:17: /home/viktor/.node-gyp/10.13.0/include/node/v8.h:2892:28: note: declared here explicit Utf8Value(Local obj)); ^ /home/viktor/.node-gyp/10.13.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^ ../buffertools.cc:475:39: warning: ‘v8::Local v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations] Local b = arg->ToObject(); ^ In file included from /home/viktor/.node-gyp/10.13.0/include/node/node.h:63:0, from ../buffertools.cc:17: /home/viktor/.node-gyp/10.13.0/include/node/v8.h:10046:15: note: declared here Local Value::ToObject() const { ^ ../buffertools.cc: In instantiation of ‘v8::Local {anonymous}::UnaryAction::operator()(const v8::FunctionCallbackInfo&) [with Derived = {anonymous}::ClearAction]’: ../buffertools.cc:431:1: required from here ../buffertools.cc:141:33: warning: ‘v8::Local v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations] target = args[0]->ToObject(); ^ In file included from /home/viktor/.node-gyp/10.13.0/include/node/node.h:63:0, from ../buffertools.cc:17: /home/viktor/.node-gyp/10.13.0/include/node/v8.h:10046:15: note: declared here Local Value::ToObject() const { ^ ../buffertools.cc: In instantiation of ‘v8::Local {anonymous}::BinaryAction::operator()(const v8::FunctionCallbackInfo&) [with Derived = {anonymous}::CompareAction]’: ../buffertools.cc:432:1: required from here ../buffertools.cc:169:33: warning: ‘v8::Local v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations] target = args[0]->ToObject(); ^ In file included from /home/viktor/.node-gyp/10.13.0/include/node/node.h:63:0, from ../buffertools.cc:17: /home/viktor/.node-gyp/10.13.0/include/node/v8.h:10046:15: note: declared here Local Value::ToObject() const { ^ ../buffertools.cc:177:43: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated: Use Isolate version [-Wdeprecated-declarations] String::Utf8Value s(args[args_start]); ^ In file included from /home/viktor/.node-gyp/10.13.0/include/node/v8.h:26:0, from /home/viktor/.node-gyp/10.13.0/include/node/node.h:63, from ../buffertools.cc:17: /home/viktor/.node-gyp/10.13.0/include/node/v8.h:2892:28: note: declared here explicit Utf8Value(Local obj)); ^ /home/viktor/.node-gyp/10.13.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^ ../buffertools.cc:187:55: warning: ‘v8::Local v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations] Local other = args[args_start]->ToObject(); ^ In file included from /home/viktor/.node-gyp/10.13.0/include/node/node.h:63:0, from ../buffertools.cc:17: /home/viktor/.node-gyp/10.13.0/include/node/v8.h:10046:15: note: declared here Local Value::ToObject() const { ^ ../buffertools.cc: In instantiation of ‘v8::Local {anonymous}::BinaryAction::operator()(const v8::FunctionCallbackInfo&) [with Derived = {anonymous}::EqualsAction]’: ../buffertools.cc:433:1: required from here ../buffertools.cc:169:33: warning: ‘v8::Local v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations] target = args[0]->ToObject(); ^ In file included from /home/viktor/.node-gyp/10.13.0/include/node/node.h:63:0, from ../buffertools.cc:17: /home/viktor/.node-gyp/10.13.0/include/node/v8.h:10046:15: note: declared here Local Value::ToObject() const { ^ ../buffertools.cc:177:43: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated: Use Isolate version [-Wdeprecated-declarations] String::Utf8Value s(args[args_start]); ^ In file included from /home/viktor/.node-gyp/10.13.0/include/node/v8.h:26:0, from /home/viktor/.node-gyp/10.13.0/include/node/node.h:63, from ../buffertools.cc:17: /home/viktor/.node-gyp/10.13.0/include/node/v8.h:2892:28: note: declared here explicit Utf8Value(Local obj)); ^ /home/viktor/.node-gyp/10.13.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^ ../buffertools.cc:187:55: warning: ‘v8::Local v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations] Local other = args[args_start]->ToObject(); ^ In file included from /home/viktor/.node-gyp/10.13.0/include/node/node.h:63:0, from ../buffertools.cc:17: /home/viktor/.node-gyp/10.13.0/include/node/v8.h:10046:15: note: declared here Local Value::ToObject() const { ^ ../buffertools.cc: In instantiation of ‘v8::Local {anonymous}::UnaryAction::operator()(const v8::FunctionCallbackInfo&) [with Derived = {anonymous}::FillAction]’: ../buffertools.cc:434:1: required from here ../buffertools.cc:141:33: warning: ‘v8::Local v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations] target = args[0]->ToObject(); ^ In file included from /home/viktor/.node-gyp/10.13.0/include/node/node.h:63:0, from ../buffertools.cc:17: /home/viktor/.node-gyp/10.13.0/include/node/v8.h:10046:15: note: declared here Local Value::ToObject() const { ^ ../buffertools.cc: In instantiation of ‘v8::Local {anonymous}::UnaryAction::operator()(const v8::FunctionCallbackInfo&) [with Derived = {anonymous}::FromHexAction]’: ../buffertools.cc:435:1: required from here ../buffertools.cc:141:33: warning: ‘v8::Local v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations] target = args[0]->ToObject(); ^ In file included from /home/viktor/.node-gyp/10.13.0/include/node/node.h:63:0, from ../buffertools.cc:17: /home/viktor/.node-gyp/10.13.0/include/node/v8.h:10046:15: note: declared here Local Value::ToObject() const { ^ ../buffertools.cc: In instantiation of ‘v8::Local {anonymous}::BinaryAction::operator()(const v8::FunctionCallbackInfo&) [with Derived = {anonymous}::IndexOfAction]’: ../buffertools.cc:436:1: required from here ../buffertools.cc:169:33: warning: ‘v8::Local v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations] target = args[0]->ToObject(); ^ In file included from /home/viktor/.node-gyp/10.13.0/include/node/node.h:63:0, from ../buffertools.cc:17: /home/viktor/.node-gyp/10.13.0/include/node/v8.h:10046:15: note: declared here Local Value::ToObject() const { ^ ../buffertools.cc:177:43: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated: Use Isolate version [-Wdeprecated-declarations] String::Utf8Value s(args[args_start]); ^ In file included from /home/viktor/.node-gyp/10.13.0/include/node/v8.h:26:0, from /home/viktor/.node-gyp/10.13.0/include/node/node.h:63, from ../buffertools.cc:17: /home/viktor/.node-gyp/10.13.0/include/node/v8.h:2892:28: note: declared here explicit Utf8Value(Local obj)); ^ /home/viktor/.node-gyp/10.13.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^ ../buffertools.cc:187:55: warning: ‘v8::Local v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations] Local other = args[args_start]->ToObject(); ^ In file included from /home/viktor/.node-gyp/10.13.0/include/node/node.h:63:0, from ../buffertools.cc:17: /home/viktor/.node-gyp/10.13.0/include/node/v8.h:10046:15: note: declared here Local Value::ToObject() const { ^ ../buffertools.cc: In instantiation of ‘v8::Local {anonymous}::UnaryAction::operator()(const v8::FunctionCallbackInfo&) [with Derived = {anonymous}::ReverseAction]’: ../buffertools.cc:437:1: required from here ../buffertools.cc:141:33: warning: ‘v8::Local v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations] target = args[0]->ToObject(); ^ In file included from /home/viktor/.node-gyp/10.13.0/include/node/node.h:63:0, from ../buffertools.cc:17: /home/viktor/.node-gyp/10.13.0/include/node/v8.h:10046:15: note: declared here Local Value::ToObject() const { ^ ../buffertools.cc: In instantiation of ‘v8::Local {anonymous}::UnaryAction::operator()(const v8::FunctionCallbackInfo&) [with Derived = {anonymous}::ToHexAction]’: ../buffertools.cc:438:1: required from here ../buffertools.cc:141:33: warning: ‘v8::Local v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations] target = args[0]->ToObject(); ^ In file included from /home/viktor/.node-gyp/10.13.0/include/node/node.h:63:0, from ../buffertools.cc:17: /home/viktor/.node-gyp/10.13.0/include/node/v8.h:10046:15: note: declared here Local Value::ToObject() const { ^ make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. ```
bnoordhuis commented 6 years ago

Thanks for the report. I'll probably move buffertools to unsupported/unmaintained status after Node.js 11 (or whenever it won't build any more) because it's been largely subsumed by the built-in Buffer class.