summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/viewgeom.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-01-01 17:22:57 +0100
committerAdam Borowski <kilobyte@angband.pl>2011-01-01 17:22:57 +0100
commit0a626dba895186d1627d07029336eb1dd919ec87 (patch)
treeb5a2e717100643e1b045a5427b72de5512db7571 /crawl-ref/source/viewgeom.cc
parent4469633ff52b1bc14e50ff2f9403304341a11538 (diff)
downloadcrawl-ref-0a626dba895186d1627d07029336eb1dd919ec87.tar.gz
crawl-ref-0a626dba895186d1627d07029336eb1dd919ec87.zip
Silence a gcc-4.5 warning for a tautological assert.
Sadly, we can't do this in the ASSERT() #define itself, as in GCC versions up to 4.5 warning pragmas are global, setting them in any place in the file affects the entire compilation unit no matter where you specify it. GCC 4.6 and new Clangs allow you to flip warnings as often as you please, so we'll be able to do this properly then.
Diffstat (limited to 'crawl-ref/source/viewgeom.cc')
-rw-r--r--crawl-ref/source/viewgeom.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/viewgeom.cc b/crawl-ref/source/viewgeom.cc
index 452331db91..e6a715b635 100644
--- a/crawl-ref/source/viewgeom.cc
+++ b/crawl-ref/source/viewgeom.cc
@@ -45,6 +45,10 @@ class _layout
valid(false) {}
protected:
+// Smart compilers can recognize some of these assertions as tautological,
+// but we do want to keep them in case something changes.
+// A discussion: http://kerneltrap.org/node/7434
+#pragma GCC diagnostic ignored "-Wstrict-overflow"
void _assert_validity() const
{
#ifndef USE_TILE