...
This code first sets errno
to 0 to comply with ERR30-C. Set errno to zero before calling a library function known to set errno, and check errno only after the function returns a value indicating failureTake care when reading errno.
Compliant Solution (Annex K, strerror_s()
)
...
Tool | Version | Checker | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Astrée |
| Supported, but no explicit checker | |||||||||||||
CodeSonar |
| BADFUNC.RANDOM.RAND | Use of | ||||||||||||
Compass/ROSE | A module written in Compass/ROSE can detect violations of this rule | ||||||||||||||
Helix QAC |
| C5037 C++5021 DF4976, DF4977 | |||||||||||||
Klocwork |
| CERT.CONC.LIB_FUNC_USE | |||||||||||||
LDRA tool suite |
| 44 S | Partially Implemented | ||||||||||||
Parasoft C/C++test |
| CERT_C-CON33-a | Avoid using thread-unsafe functions | ||||||||||||
PC-lint Plus |
| 586 | Fully supported | ||||||||||||
| CERT C: Rule CON33-C | Checks for data Data race through standard library function call | Multiple tasks make unprotected calls to thread-unsafe standard library function | PRQA QA-C++ | Include Page | | cplusplus:PRQA QA-C++_V | cplusplus:PRQA QA-C++_V | 5021(rule fully covered)
Related Guidelines
Key here (explains table format and definitions)
...