amagnasco / xwpe

Upload of an abandoned ncurses-based programming environment
http://www.identicalsoftware.com/xwpe/
GNU General Public License v2.0
29 stars 6 forks source link

bad code: switch statement op +/- 900 lines of code with fallthrough!! #63

Open gbonnema opened 7 years ago

gbonnema commented 7 years ago

The switch statement in we_fl_unix.c in function WpeHandleFileManager() runs from 554 to 1435 (at the moment) and every case statement runs through! The break statements are all conditional!

It is unclear whether this is intentional, but for a switch statement of approx. 900 lines, I would say it is a problem!

For that reason I create this issue: I cannot solve these warnings of implicit fallthrough in a reasonable time, because it is impossible to determine whether the fallthrough is correct!!

Given time we should have a go at refactoring this monstrosity!!

P.S. I consider this code to be a major bug.