From f49c57c4f0098e746187bb7366356135a5670b92 Mon Sep 17 00:00:00 2001 From: Arthur O'Dwyer Date: Mon, 23 Mar 2020 14:48:56 -0400 Subject: [PATCH] Fix a bug found by Clang's `-Wtautological-overlap-compare`. ./help.cpp:880:89: error: overlapping comparisons always evaluate to false [-Werror,-Wtautological-overlap-compare] if(!((c->wall == waCavefloor || c->wall == waCavewall) && (c->land == laEmerald && c->land == laCaves))) ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ --- help.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/help.cpp b/help.cpp index 32227e7c..4c69038d 100644 --- a/help.cpp +++ b/help.cpp @@ -877,7 +877,7 @@ EX void describeMouseover() { "Trees in this forest can be chopped down. Big trees take two turns to chop down."; else if(c->wall != waSea && c->wall != waPalace && c->wall != waDeadfloor) - if(!((c->wall == waCavefloor || c->wall == waCavewall) && (c->land == laEmerald && c->land == laCaves))) + if(!((c->wall == waCavefloor || c->wall == waCavewall) && (c->land == laEmerald || c->land == laCaves))) if(!((isAlch(c->wall) && c->land == laAlchemist))) help = bygen([c] () { gotoHelpFor(c->wall); }); }