...
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 | ||
|---|---|---|
| ||
#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 | ||
|---|---|---|
| ||
extern int errno; |
...
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
|---|---|---|---|---|---|
MSC38-C | low | unlikely | medium | P2 | L3 |
Bibliography
Related Guidelines
\[[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 aboveWiki Markup
Bibliography
...
49. Miscellaneous (MSC) MSC39-C. Do not call va_arg() on a va_list that has indeterminate value