Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The programmer should place nonstandard verification in a function that does not conflict with the standard library macro assert, e.g. for example, myassert().

Code Block
bgColor#ccccff
#include <myassert.h>
#include <assert.h>

void fullAssert(int e) {
  assert(0 < e); // standard library assert()
  myassert(e); // well defined custom assertion function
}

...

Legacy code is apt to include an incorrect declaration, such as the following.

Code Block
bgColor#FFcccc
extern int errno;

...

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

MSC38-C

low

unlikely

medium

P2

L3

Bibliography

Related Guidelines

Wiki Markup\[[ISO/IEC 9899:1999|AA. Bibliography#ISO/IEC 9899-1999]\], all sections indicated by the [undefined behavior items |CC. Undefined Behavior] noted above.: all sections indicated by the undefined behavior items noted above

Bibliography

...

      49. Miscellaneous (MSC)      MSC39-C. Do not call va_arg() on a va_list that has indeterminate value