Package Index  Table of Contents

CodeCheck ECS C/C++ to Test Suite - 52.cpp

/*
52.    Label closing braces in highly nested control structure.
*/
// BAD



Function Name: foo1()

foo1() {
	if ( 1 ) {
		if ( 2 ) {
			if ( 3 ) {
			}
		}
	}
}
// GOOD



Function Name: foo2()

foo2() {
	if ( 1 ) {
		if ( 2 ) {
			if ( 3 ) {
			}	// good
		}		// good
	}			// good
}

Package Index  Table of Contents

CodeCheck Copyright (c) 1988-2005 by Abraxas Software Inc. (R). All rights reserved.