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

Experimental (removed all warning except for fall through) #64

Closed gbonnema closed 7 years ago

gbonnema commented 7 years ago

This pull request replaces #61 Warnings which is now obsolete.

I resolved all warnings except for the warnings concerning #63 bad code: switch statement of +/- 900 lines which I still regard to be a major bug. I am not convinced it is wrong tho, just unmaintainable.

This pull request gets the warnings mostly out of the way so we can develop with the options -Wall -Wextra without drowning in warnings. That way we should be able to spot new code that potentially breaks stuff.

gbonnema commented 7 years ago

When checking the results, I find:

  1. CLANG has one extra warning (emtpy while loop) which gcc overlooked. Apparantly gcc only warns for an empty loop if the next line is indented. In this case the next statement was on the same line as the while. CLANG advised to put the semicolon on a separate line, which I did, and added braces.
  2. The warnings I get for fall through if the switch-case statements in we_fl_unix.c do not appear on the any of the travis tests. Since I upgraded Fedora to version 26, I am using gcc-7, which apparantly is different.

As I have no problems with this pull request I will merge them shortly.