You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "zwoop (via GitHub)" <gi...@apache.org> on 2023/07/13 18:01:21 UTC
[GitHub] [trafficserver] zwoop opened a new issue, #10031: CID 1513213: Uninitialized members
zwoop opened a new issue, #10031:
URL: https://github.com/apache/trafficserver/issues/10031
```
*** CID 1513213: Uninitialized members (UNINIT_CTOR)
/lib/swoc/include/swoc/Errata.h: 1288 in swoc::_1_5_1::Rv<unsigned long>::Rv(swoc::_1_5_1::Errata &&)()
1282 template <typename T> Rv<T>::Rv(result_type const &r, Errata &&errata) : _r(r), _errata(std::move(errata)) {}
1283
1284 template <typename R> Rv<R>::Rv(R &&r) : _r(std::move(r)) {}
1285
1286 template <typename R> Rv<R>::Rv(R &&r, Errata &&errata) : _r(std::move(r)), _errata(std::move(errata)) {}
1287
CID 1513213: Uninitialized members (UNINIT_CTOR)
Non-static class member "_r" is not initialized in this constructor nor in any functions that it calls.
1288 template <typename R> Rv<R>::Rv(Errata &&errata) : _errata{std::move(errata)} {}
1289
1290 template <typename T> Rv<T>::operator result_type const &() const {
1291 return _r;
1292 }
1293
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] SolidWallOfCode closed issue #10031: CID 1513213: Uninitialized members
Posted by "SolidWallOfCode (via GitHub)" <gi...@apache.org>.
SolidWallOfCode closed issue #10031: CID 1513213: Uninitialized members
URL: https://github.com/apache/trafficserver/issues/10031
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] SolidWallOfCode commented on issue #10031: CID 1513213: Uninitialized members
Posted by "SolidWallOfCode (via GitHub)" <gi...@apache.org>.
SolidWallOfCode commented on issue #10031:
URL: https://github.com/apache/trafficserver/issues/10031#issuecomment-1634961706
This is by design. `Rv` pairs a value and an error report. If the error report is present then the value cannot be trusted. This is no different than checking the return value of a function before accessing the returned data. Given the template nature there is no generic way for the template to safely initialize the value, it must provided by the caller.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org