[previous] 0690 [next] [C] String literal contains too many characters to initialize object.
Constraint violations REFERENCE - ISO:C90-6.5.7 Initialization - Constraints, Semantics

This is a constraint error

An array is being initialised with a string literal which contains too many characters. For example:


/*PRQA S 2017,3122,3132,3211,3408,3625,3674 ++*/

char buf1[ ] = "Hello";     /* OK */
char buf2[6] = "Hello";     /* OK */
char buf3[4] = "Hello";     /* Message 0690 */

See also:

QA·C Source Code Analyser 8.1.2
© 2013 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index Contents