node
node copied to clipboard
quic: address coverity warning
- initiaze variable in similar way down in other constructors
Coverity report
170QuicError::QuicError(const ngtcp2_ccerr* ptr)
171 : reason_(reinterpret_cast<const char*>(ptr->reason), ptr->reasonlen),
2. uninit_member: Non-static class member error_.type is not initialized in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member error_.error_code is not initialized in this constructor nor in any functions that it calls.
6. uninit_member: Non-static class member error_.frame_type is not initialized in this constructor nor in any functions that it calls.
8. uninit_member: Non-static class member error_.reason is not initialized in this constructor nor in any functions that it calls.
CID 338953: (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
10. uninit_member: Non-static class member error_.reasonlen is not initialized in this constructor nor in any functions that it calls.
172 ptr_(ptr) {}
173
CI: https://ci.nodejs.org/job/node-test-pull-request/58988/
CI: https://ci.nodejs.org/job/node-test-pull-request/58990/
CI: https://ci.nodejs.org/job/node-test-pull-request/59044/
CI: https://ci.nodejs.org/job/node-test-pull-request/59064/
Landed in Landed in fd1e66f6cb9e