Versions Compared

Key

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

...

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()

...

5021(rule fully covered)

Tool

Version

Checker

Description

Astrée
Include Page
Astrée_V
Astrée_V

Supported, but no explicit checker
CodeSonar
Include Page
CodeSonar_V
CodeSonar_V

BADFUNC.RANDOM.RAND
BADFUNC.TEMP.TMPNAM
BADFUNC.TTYNAME

Use of rand (includes check for uses of srand())
Use of tmpnam (includes check for uses of tmpnam_r())
Use of ttyname

Compass/ROSE



A module written in Compass/ROSE can detect violations of this rule

Helix QAC

Include Page
Helix QAC_V
Helix QAC_V

C5037

C++5021

DF4976, DF4977


Klocwork
Include Page
Klocwork_V
Klocwork_V

CERT.CONC.LIB_FUNC_USE


LDRA tool suite
 
Include Page
LDRA_V
LDRA_V
44 SPartially Implemented
Parasoft C/C++test
Include Page
Parasoft_V
Parasoft_V

CERT_C-CON33-a

Avoid using thread-unsafe functions

PC-lint Plus

Include Page
PC-lint Plus_V
PC-lint Plus_V

586

Fully supported

Polyspace Bug Finder

Include Page
Polyspace Bug Finder_V
Polyspace Bug Finder_V

CERT C: Rule CON33-CChecks for data Data race through standard library function call Multiple tasks make unprotected calls to thread-unsafe standard library functionPRQA QA-C++
Include Page
cplusplus:PRQA QA-C++_Vcplusplus:PRQA QA-C++_V

Related Guidelines

Key here (explains table format and definitions)

...