santigimeno/node-pcsclite

Deprecated NAN API in use

Closed this issue · 4 comments

pcsclite@0.6.0 isntallation

> node-gyp rebuild

  CXX(target) Release/obj.target/pcsclite/src/addon.o
  CXX(target) Release/obj.target/pcsclite/src/pcsclite.o
../src/pcsclite.cpp:145:56: warning: 'Call' is deprecated [-Wdeprecated-declarations]
        Nan::Callback(Nan::New(async_baton->callback)).Call(argc, argv);
                                                       ^
../../nan/nan.h:1567:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/pcsclite.cpp:148:56: warning: 'Call' is deprecated [-Wdeprecated-declarations]
        Nan::Callback(Nan::New(async_baton->callback)).Call(1, argv);
                                                       ^
../../nan/nan.h:1567:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
2 warnings generated.
  CXX(target) Release/obj.target/pcsclite/src/cardreader.o
../src/cardreader.cpp:353:60: warning: 'Call' is deprecated [-Wdeprecated-declarations]
            Nan::Callback(Nan::New(async_baton->callback)).Call(argc, argv);
                                                           ^
../../nan/nan.h:1567:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/cardreader.cpp:360:56: warning: 'Call' is deprecated [-Wdeprecated-declarations]
        Nan::Callback(Nan::New(async_baton->callback)).Call(argc, argv);
                                                       ^
../../nan/nan.h:1567:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/cardreader.cpp:474:50: warning: 'Call' is deprecated [-Wdeprecated-declarations]
        Nan::Callback(Nan::New(baton->callback)).Call(argc, argv);
                                                 ^
../../nan/nan.h:1567:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/cardreader.cpp:483:50: warning: 'Call' is deprecated [-Wdeprecated-declarations]
        Nan::Callback(Nan::New(baton->callback)).Call(argc, argv);
                                                 ^
../../nan/nan.h:1567:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/cardreader.cpp:529:50: warning: 'Call' is deprecated [-Wdeprecated-declarations]
        Nan::Callback(Nan::New(baton->callback)).Call(argc, argv);
                                                 ^
../../nan/nan.h:1567:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/cardreader.cpp:537:50: warning: 'Call' is deprecated [-Wdeprecated-declarations]
        Nan::Callback(Nan::New(baton->callback)).Call(argc, argv);
                                                 ^
../../nan/nan.h:1567:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/cardreader.cpp:590:50: warning: 'Call' is deprecated [-Wdeprecated-declarations]
        Nan::Callback(Nan::New(baton->callback)).Call(argc, argv);
                                                 ^
../../nan/nan.h:1567:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/cardreader.cpp:598:50: warning: 'Call' is deprecated [-Wdeprecated-declarations]
        Nan::Callback(Nan::New(baton->callback)).Call(argc, argv);
                                                 ^
../../nan/nan.h:1567:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/cardreader.cpp:654:50: warning: 'Call' is deprecated [-Wdeprecated-declarations]
        Nan::Callback(Nan::New(baton->callback)).Call(argc, argv);
                                                 ^
../../nan/nan.h:1567:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
../src/cardreader.cpp:662:50: warning: 'Call' is deprecated [-Wdeprecated-declarations]
        Nan::Callback(Nan::New(baton->callback)).Call(argc, argv);
                                                 ^
../../nan/nan.h:1567:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
10 warnings generated.
  SOLINK_MODULE(target) Release/pcsclite.node

Thanks for reporting. I guess it's still working, right? I'll look into it as soon as I have the time.

@microshine Can you test if #83 fixes the issue for you? (I won't be able to test this for a couple of weeks)

@santigimeno I ran node-gyp configure build for your fix_warning branch. It has one deprecated warning

> node-gyp rebuild

  CXX(target) Release/obj.target/pcsclite/src/addon.o
  CXX(target) Release/obj.target/pcsclite/src/pcsclite.o
  CXX(target) Release/obj.target/pcsclite/src/cardreader.o
../src/cardreader.cpp:373:14: warning: 'MakeCallback' is deprecated
      [-Wdeprecated-declarations]
        Nan::MakeCallback(async_baton->reader->handle(), "emit", 1, argv);
             ^
../node_modules/nan/nan.h:971:3: note: 'MakeCallback' has been explicitly marked
      deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
  ^
../node_modules/nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
1 warning generated.
  SOLINK_MODULE(target) Release/pcsclite.node

This should be fixed in version v1.0.0.