Troubleshooting
Problem
Attempts to use Code Review component for IBM Rational Test RealTime render the rule M12.6.
Symptom
When you run Code Review on the example below, you get unexpected output.
#include <stdint.h> static void yad(void); extern uint16_t try_something(void); static void yad(void) { uint16_t Attempts = 42u; uint16_t Error = 0u; do { Error = try_something(); Attempts--; } while((Attempts != 0U) && (Error != 0u)); }
|
The code review checker (crccc) then shows the following output.
script C:\Program Files\Rational\TestRealTime\lib\scripts\Source.pl
code.c: Compiling...
|
Code Review checker reports error on the while(...) statement :
Rule M12.6.2:The operator on a Boolean expression should be a logical operator ( &&, || or !).
Rule M12.6.1:Only Boolean operands should be used with logical operators (&&, || and !).
Log InLog in to view more of this document
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21585557