![]() |
![]() |
2213 | ![]() |
||||
![]() | |||||||
| Bracing and Indentation | |||||||
This line contains both opening and closing braces. This contravenes the principles of bracing style but is often convenient in struct/union definitions, initializers and in control statements with a single statement 'body'. For example:
/*PRQA S 2017,2216,3120,3205,3227,3408,3447,3604,3674 ++*/
struct ST {int a; int b;}; /* Message 2213 */
struct ST stx = { 1, 3 }; /* Message 2213 */
extern void foo(int n)
{
int buf[] = {1, 2, 3, 4}; /* Message 2213 */
if (n > 0) {++stx.a;} /* Message 2213 */
}
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |