Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RTE call
#2
It is not possible to give a clear comment from the given example of code.  In general the comma operator can be replaced by splitting up the expression.
For example:

Code:
  X = ( A = B, 0 );
    can be replaced by
  A = B; X = 0;
and
  while ( (A = B, A > 0) ) { .... }
      can be replaced by
  A = B;
  while ( A > 0 {  ... A = B; }

If it is not possible to ammend the code, the advisory rule could be disapplied subject to appropriate justificatications.
Posted by and on behalf of the MISRA C Working Group
Reply


Messages In This Thread
RTE call - by kprzygoda - 10-03-2022, 11:21 AM
RE: RTE call - by misra-c - 23-04-2022, 03:47 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)