I want to understand the basics of this issue. I suspect that something is wrong with the casting, it is occasionally entering the if statement when it is not supposed to. i read some posts but couldn't understand what is the issue exactly. relevant code:
int32_t my_int_var; // this should not be less than -20
#define MY_DEFAULT_VAR 20u
if(my_int_var < (-1*MY_DEFAULT_VAR)){
FailTest();
}