Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added clarity to some of the CSes

...

Code Block
bgColor#ccccff
langc
int *p;
/* ... */
p++p;

If the intent was to increment the value referred to by p, then parentheses can be used to ensure p is dereferenced and then incremented. (See EXP00-C. Use parentheses for precedence of operation.)

...

Code Block
bgColor#ccccff
langc
volatile int *p;
/* ... */
(void) *(p++);

Risk Assessment

The presence of code that has no effect can indicate logic errors that may result in unexpected behavior and vulnerabilities.

...