node icon indicating copy to clipboard operation
node copied to clipboard

quic: address coverity warning

Open mhdawson opened this issue 1 month ago • 3 comments

  • initiaze variable in similar way down in other constructors

mhdawson avatar May 03 '24 15:05 mhdawson

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

mhdawson avatar May 03 '24 15:05 mhdawson

CI: https://ci.nodejs.org/job/node-test-pull-request/58988/

nodejs-github-bot avatar May 06 '24 13:05 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/58990/

nodejs-github-bot avatar May 06 '24 18:05 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/59044/

nodejs-github-bot avatar May 08 '24 19:05 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/59064/

nodejs-github-bot avatar May 09 '24 19:05 nodejs-github-bot

Landed in Landed in fd1e66f6cb9e

mhdawson avatar May 10 '24 14:05 mhdawson