Assertion in nethost is always true

Bug #1033213 reported by Hans Joachim Desserud
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
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.

Tags: network
description: updated
Revision history for this message
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
Revision history for this message
Nasenbaer (nasenbaer) wrote :

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

Changed in widelands:
status: Confirmed → Fix Committed
Nasenbaer (nasenbaer)
Changed in widelands:
assignee: Nasenbaer (nasenbaer) → nobody
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.