ywkaras commented on code in PR #10907:
URL: https://github.com/apache/trafficserver/pull/10907#discussion_r1420527689
##########
plugins/xdebug/xdebug.cc:
##########
@@ -888,16 +888,19 @@ TSPluginInit(int argc, const char *argv[])
// Make xDebugHeader available to other plugins, as a C-style string.
//
- int idx = -1;
- TSReleaseAssert(TSUserArgIndexReserve(TS_USER_ARGS_GLB, "XDebugHeader",
"XDebug header name", &idx) == TS_SUCCESS);
+ int idx = -1;
+ auto ret = TSUserArgIndexReserve(TS_USER_ARGS_GLB, "XDebugHeader", "XDebug
header name", &idx);
+ TSReleaseAssert(ret == TS_SUCCESS);
TSReleaseAssert(idx >= 0);
TSUserArgSet(nullptr, idx, const_cast<char *>(xDebugHeader.str));
AuxDataMgr::init("xdebug");
// Setup the global hook
- TSReleaseAssert(XInjectHeadersCont = TSContCreate(XInjectResponseHeaders,
nullptr));
- TSReleaseAssert(XDeleteDebugHdrCont = TSContCreate(XDeleteDebugHdr,
nullptr));
Review Comment:
For these, did Coverity complain it was a possible unintentional assignment
(accidentally using = instead of ==)?
At a higher warning level, gcc will warn about this. If you use double
parens, like:
TSReleaseAssert((XInjectHeadersCont = TSContCreate(XInjectResponseHeaders,
nullptr)));
gcc takes that as indicating you intended to do assignment not compare.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]