Ticket #8880 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Fix error in comparison operation in GenerateEventsFilter.cpp

Reported by: Russell Taylor Owned by: Wenduo Zhou
Priority: critical Milestone: Release 3.2
Component: Framework Keywords:
Cc: Blocked By:
Blocking: #8940 Tester: Martyn Gigg

Description

cppcheck has spotted the error at line 1166: Same expression on both sides of '<='.

Here's the code where in the second line an element of values is being compared to itself:

 else if ((i == 0) || (i >= 1 && ((filterIncrease && values[i] >= values[i-1]) ||
                                  (filterDecrease && values[i] <= values[i]))))

Change History

comment:1 Changed 7 years ago by Russell Taylor

  • Blocking 8940 added

comment:2 Changed 7 years ago by Wenduo Zhou

  • Status changed from new to inprogress

Fixed the error reported by cppcheck. Refs #8880.

Changeset: ee495ae40ec067de7d133ab03dc59b380c664979

comment:3 Changed 7 years ago by Wenduo Zhou

  • Status changed from inprogress to verify
  • Resolution set to fixed

For testers

Please go to line 1116 to see the change of code, check cpp build server, and check whether the unit tests and system tests do not break.

comment:4 Changed 7 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester set to Martyn Gigg

comment:5 Changed 7 years ago by Martyn Gigg

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/8880_fix_cpp'

Full changeset: f2e7e2713503f8b559caf8d1a14f6973a5228f65

comment:6 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9724

Note: See TracTickets for help on using tickets.