Nuke as many warnings as possible, and several globals as well

- Warnings completely suppressed for the included TinyXML and gzstream libraries
- Parentheses warnings are now errors, since there were several that looked like bugs
- Ditto for dangling else warnings

Some of these warnings were actually bugs:
- Town wandering monsters would have never spawned, because the code to do so was accidentally nested within a check for overall_mode == MODE_OUTDOORS
---> boe.monster.cpp, lines 105-137
- Monster's behaviour with respect to elemental fields did not correctly depend on their immunities (this is the same precedence issue Sylae messed up fixing in the Windows code)
---> boe.monsters.cpp, lines 345-359
- Display of damage blocked by armour appeared to be incorrect (needs verification)
---> boe.newgraph.cpp, line 1079
- Three-choice dialogs probably weren't dealing with unusual button types correctly, though that's a minor point since they aren't expected to use such buttons
This commit is contained in:
2014-12-04 06:16:40 -05:00
parent e7d8a6d848
commit 94d8717a0b
74 changed files with 611 additions and 637 deletions

View File

@@ -147,7 +147,6 @@ void shut_down_menus(short mode) {
void update_item_menu() {
MenuHandler* targ = [[file_menu itemAtIndex: 0] target];
short i,j;
char item_name[256];
for(j = 0; j < 5; j++) {
[item_menu[j] removeAllItems];
@@ -188,6 +187,7 @@ void handle_monst_menu(int item_hit);
// TODO: Implement edit menu (much work to be done here!)
-(void) editMenu:(id) sender {
(void) sender; // Suppress "unused parameter" warning
}
-(void) scenMenu:(id) sender {
@@ -204,9 +204,11 @@ void handle_monst_menu(int item_hit);
// TODO: Monster and item menus
-(void) itemMenu:(id) sender {
(void) sender; // Suppress "unused parameter" warning
}
-(void) monstMenu:(id) sender {
(void) sender; // Suppress "unused parameter" warning
}
-(void) helpMenu:(id) sender {
@@ -214,6 +216,7 @@ void handle_monst_menu(int item_hit);
}
-(void) onlineHelp:(id) sender {
(void) sender;
[[NSWorkspace sharedWorkspace] openURL: [NSURL URLWithString: @"https://calref.net/~sylae/boe-doc/editor/About.html"]];
}
@end