549 | | See also [https://svn.boost.org/trac/boost/wiki/WarningFixes] for progress on warning suppression.[[BR]] |
| 549 | Warnings often indicate real problems. Sometimes they only manifest |
| 550 | on a particular platform, revealing a portability issue. Sometimes |
| 551 | they indicate that the code doesn't account for a runtime condition, |
| 552 | like overflow, which the warning can only suggest as a possibility. |
| 553 | |
| 554 | Suppressing a warning without altering code may simply mask a problem. |
| 555 | The right approach is to determine why the warning occurs is to decide |
| 556 | whether it is correct in the context, and if so, apply appropriate remediation. |
| 557 | If the warning is not correct in the context, only then should it be suppressed. |
| 558 | |
| 559 | Because developers don't have the same knowledge, even among Boost |
| 560 | developers, Boost is amassing information to help them know when a |
| 561 | warning is significant and not. That information can show cases in |
| 562 | which a warning is legitimate and when it isn't. For the former, |
| 563 | there is help to understand how to change the code portably to |
| 564 | account for the problem revealed by the warning. For the latter, |
| 565 | there is information on how to suppress the warning in a portable way. |
| 566 | |
| 567 | Changing code can lead to bugs. Thus, changing code to eliminate a warning might create a bug. That's unfortunate. |
| 568 | From a maintenance standpoint, however, most would prefer to see altered code to a |
| 569 | glob of preprocessor and pragma line noise that suppresses a warning in the unchanged code. |
| 570 | |
| 571 | Testing will reveal the bug. If it doesn't, the testing is insufficient. |
| 572 | If the bug appears on an untested platform, then more testers are needed to be able to detect such bugs in the future. |
| 573 | |
| 574 | See also [https://svn.boost.org/trac/boost/wiki/WarningFixes] for progress made on warning fixes/suppression.[[BR]] |