File tree Expand file tree Collapse file tree 4 files changed +12
-5
lines changed Expand file tree Collapse file tree 4 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ Napi::Value IncomingMsg::IntoBuffer(const Napi::Env& env) {
39
39
moved = true ;
40
40
41
41
/* Put appropriate GC pressure according to the size of the buffer. */
42
- Napi::MemoryManagement::AdjustExternalMemory (env, length);
42
+ Napi::MemoryManagement::AdjustExternalMemory (
43
+ env, static_cast <int64_t >(length));
43
44
44
45
auto release = [](const Napi::Env& env, uint8_t *, Reference* ref) {
45
46
const auto length = static_cast <int64_t >(zmq_msg_size (*ref));
Original file line number Diff line number Diff line change 1
1
2
2
#include " ./observer.h"
3
3
4
+ #include < cstdint>
5
+
4
6
#include " ./context.h"
5
7
#include " ./module.h"
6
8
#include " ./socket.h"
@@ -283,7 +285,7 @@ void Observer::Receive(const Napi::Promise::Deferred& res) {
283
285
#ifdef ZMQ_EVENT_HANDSHAKE_FAILED_NO_DETAIL
284
286
case ZMQ_EVENT_HANDSHAKE_FAILED_NO_DETAIL:
285
287
#endif
286
- event[" error" ] = ErrnoException (Env (), value).Value ();
288
+ event[" error" ] = ErrnoException (Env (), static_cast < int32_t >( value) ).Value ();
287
289
break ;
288
290
289
291
#ifdef ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL
@@ -305,6 +307,8 @@ void Observer::Receive(const Napi::Promise::Deferred& res) {
305
307
Close ();
306
308
break ;
307
309
}
310
+ default :
311
+ break ;
308
312
}
309
313
310
314
res.Resolve (event);
Original file line number Diff line number Diff line change @@ -872,10 +872,12 @@ void Socket::SetSockOpt(const Napi::CallbackInfo& info) {
872
872
/* Mirror a few options that are used internally. */
873
873
switch (option) {
874
874
case ZMQ_SNDTIMEO:
875
- send_timeout = value;
875
+ send_timeout = static_cast < int64_t >( value) ;
876
876
break ;
877
877
case ZMQ_RCVTIMEO:
878
- receive_timeout = value;
878
+ receive_timeout = static_cast <int64_t >(value);
879
+ break ;
880
+ default :
879
881
break ;
880
882
}
881
883
}
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ class UvDelayed {
29
29
[[maybe_unused]] int32_t err = 0 ;
30
30
31
31
/* Idle handle is needed to stop the event loop from blocking in poll. */
32
- err = uv_idle_start (idle, [](uv_idle_t * idle) {});
32
+ err = uv_idle_start (idle, []([[maybe_unused]] uv_idle_t * idle) {});
33
33
assert (err == 0 );
34
34
35
35
err = uv_check_start (check, [](uv_check_t * check) {
You can’t perform that action at this time.
0 commit comments