Closed (fixed)
Project:
FeedAPI
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
18 Dec 2007 at 20:07 UTC
Updated:
4 Jan 2008 at 11:02 UTC
"break;" lines after "return ...;" lines are unreachable. This patch cleans all unreachable "break;" lines from FeedAPI.
| Comment | File | Size | Author |
|---|---|---|---|
| feedapi-no_break_after_return.patch | 5.44 KB | mustafau |
Comments
Comment #1
aron novakFirst, thanks for the ready-to-use and useful patch! Please allow me to defend the current situation:
If later the code will change (no return statement for some reasons), a nasty thing can happen: the case branches will fall to the other branches. These lines of code are very defensive, but my opinion is that it's not an inherently bad thing.
Comment #2
alex_b commentedI would like to roll this patch. Although I see what Aron is talking about, a break after a return won't ever be called. Pretty sure :)
Comment #3
aron novakAfter a short reconsideration I committed the patch, it makes the code shorter and cleaner. Thanks again!
Comment #4
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.