CERT-DCL37-C_b
In this section:
Synopsis
Do not declare or define a reserved identifier
Enabled by default
Yes
Severity/Certainty
Low/Low

Full description
Do not declare or define a reserved identifier
Coding standards
- CERT DCL37-C
Do not declare or define a reserved identifier
Code examples
The following code example fails the check and will give a warning:
#include <stddef.h>
static const size_t wcsa_max_limit = 1024;
size_t wcsa_limit = 100;
unsigned int getValue(unsigned int count) {
return count < wcsa_limit ? count : wcsa_limit;
}
The following code example passes the check and will not give a warning about this issue:
#include <stddef.h>
static const size_t max_limit = 1024;
size_t limit = 100;
unsigned int getValue(unsigned int count) {
return count < limit ? count : limit;
}