Bug 495465

Summary: idzebra-2.0.36-2.1: undefined code
Product: [openSUSE] openSUSE 11.2 Reporter: David Binderman <dcb314>
Component: OtherAssignee: Karl Eichwalder <ke>
Status: RESOLVED UPSTREAM QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Factory   
Target Milestone: unspecified   
Hardware: All   
OS: openSUSE 11.1   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description David Binderman 2009-04-16 10:35:02 UTC
I just tried to build Factory package idzebra-2.0.36-2.1
and the build said

bset.c:261: warning: operation on 'i' may be undefined

The source code is

            while ((i1=trav_BSet (sh, src, ++i)) == i)

I agree with the compiler. There is no guarantee
that the left side of a compare is evaluated before the
right side of a compare.  Suggest code rework.
Comment 1 Karl Eichwalder 2009-04-20 10:50:16 UTC
Reported upstream: http://lists.indexdata.dk/pipermail/zebralist/2009-April/002185.html
Comment 2 Karl Eichwalder 2009-04-21 12:11:27 UTC
Patch is now available from here: http://lists.indexdata.dk/pipermail/zebralist/2009-April/002187.html (thanks, Adam!).

Because this code fragment is only in use while debugging, I will wait for the next official idzebra update.