Bug 485750

Summary: x11-input-wacom-0.8.2-3.6: undefined code
Product: [openSUSE] openSUSE 11.2 Reporter: David Binderman <dcb314>
Component: X.OrgAssignee: E-mail List <xorg-maintainer-bugs>
Status: RESOLVED UPSTREAM QA Contact: E-mail List <xorg-maintainer-bugs>
Severity: Normal    
Priority: P5 - None CC: markgray+to-suse, sndirsch
Version: Factory   
Target Milestone: ---   
Hardware: All   
OS: openSUSE 11.1   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description David Binderman 2009-03-16 19:41:30 UTC
I just tried to compile Factory package x11-input-wacom-0.8.2-3.6
and the compiler said

./wcmXCommand.c:847: warning: operation on 'sNum' may be undefined

The source code is

        return priv->tvResolution[sNum++] | (priv->tvResolution[sNum] << 16);

I have read the code and I agree with the compiler.

There is no requirement that an expression is evaluated left
to right.

Suggest code rework. Perhaps

        return priv->tvResolution[sNum] | (priv->tvResolution[sNum + 1] << 16);

might work.
Comment 1 Stefan Dirsch 2009-03-16 20:28:37 UTC
Please report it upstream to Ping Cheng <pingc@wacom.com>. Thanks.
Comment 2 David Binderman 2009-03-17 09:21:36 UTC
(In reply to comment #1)
> Please report it upstream to Ping Cheng <pingc@wacom.com>. Thanks.

Done.