Community
Participate
Working Groups
Build Identifier: The code below produces the warning, but the is a return. int test2( int a ) { return 1; if( a == 1 ) a = 2; } Reproducible: Always
This is questionable practice. This is deadcode. Why do you have deadcode after return? Should not you fixing it in a first place?
I think we should rather give "Dead code" warning here (rather than "No return"). Codan cannot count on perfect code in editor, it is normal to have unfinished unclean pieces of code while editing code under developing.
This appears fixed in http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=16037a5f38845acb7194d12d70ba0ed6b5d04b90.
fixed