"break;" lines after "return ...;" lines are unreachable. This patch cleans all unreachable "break;" lines from FeedAPI.

CommentFileSizeAuthor
feedapi-no_break_after_return.patch5.44 KBmustafau

Comments

aron novak’s picture

First, 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.

alex_b’s picture

I 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 :)

aron novak’s picture

Status: Needs review » Fixed

After a short reconsideration I committed the patch, it makes the code shorter and cleaner. Thanks again!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.