Skip to content

CID 1518595: Side effect in assertion #10343

@maskit

Description

@maskit

intercept.cc

88  void
 89  read(TSVConn vc, TSCont contp)
 90  {
 91    TSReleaseAssert(this->vio == nullptr);
     	CID 1518570: Side effect in assertion (ASSERT_SIDE_EFFECT) [[select issue](https://scan6.scan.coverity.com/defectInstanceId=34751458&fileInstanceId=163647460&mergedDefectId=1518570)]
 92    TSReleaseAssert((this->iobuf = TSIOBufferCreate()));
   	
CID 1518595 (#1 of 1): Side effect in assertion (ASSERT_SIDE_EFFECT)
assignment_where_comparison_intended: Assignment this->reader = tsapi::c::TSIOBufferReaderAlloc(this->iobuf) has a side effect. This code will work differently in a non-debug build.
   	Did you intend to use a comparison (==) instead?
 93    TSReleaseAssert((this->reader = TSIOBufferReaderAlloc(this->iobuf)));
 94
 95    this->vio = TSVConnRead(vc, contp, this->iobuf, INT64_MAX);
 96  }

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions