Assertion in nethost is always true

Bug #1033213 reported by Hans Joachim Desserud on 2012-08-05
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Low
Unassigned

Bug Description

Found by enabling -Wlogical-op option in GCC:
/home/arch/widelands/src/network/nethost.cc:1704:2: warning: logical ‘or’ of collectively exhaustive tests is always true [-Wlogical-op]

Since or is used, the assertion is always true. Use 'and' instead?

PS. I'm experimenting a bit with additional warning options. More on this later.

description: updated
Nasenbaer (nasenbaer) wrote :

You are completely right. This is indeed a bug - as it is an assert, it's not that problematic, should be fixed anyway.
Good that I know the guy who wrote that part of te code ;) ... he told me that it was meant to be a && ;)

I will take care of the fix.
Thanks for finding this bug Hans Joachim :)

Changed in widelands:
assignee: nobody → Nasenbaer (nasenbaer)
status: New → Confirmed
milestone: none → build18-rc1
Nasenbaer (nasenbaer) wrote :

fix finally committed. Sorry, that it took me so long. :-/

Changed in widelands:
status: Confirmed → Fix Committed
Nasenbaer (nasenbaer) on 2013-07-31
Changed in widelands:
assignee: Nasenbaer (nasenbaer) → nobody
SirVer (sirver) wrote :

Released in build-18 rc1.

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers