CertC-STR¶
Characters and Strings
Nested Rules
Use plain char for characters in the basic character set |
|
Use pointers to const when referring to string literals |
|
Use the bounds-checking interfaces for string manipulation |
|
Don’t assume numeric values for expressions with type plain character |
|
Do not concatenate different type of string literals |
|
Do not specify the bound of a character array initialized with a string literal |
|
Do not attempt to modify string literals |
|
Guarantee that storage for strings has sufficient space for character data and the null terminator |
|
Do not pass a non-null-terminated character sequence to a library function that expects a string |
|
Cast characters to unsigned char before converting to larger integer sizes |
|
Arguments to character-handling functions must be representable as an unsigned char |
|
Do not confuse narrow and wide character strings and functions |
Options
Setting an option for this rule means setting the default for all nested rules.
This rule shares the following common options: exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
This rule has no individual options.