After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 590765 - Compiler warning: operation may be undefined
Compiler warning: operation may be undefined
Status: RESOLVED FIXED
Product: vino
Classification: Applications
Component: Server
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Vino Maintainer(s)
Vino Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2009-08-04 17:59 UTC by Vincent Untz
Modified: 2009-08-06 13:56 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Vincent Untz 2009-08-04 17:59:03 UTC
Forwarding https://bugzilla.novell.com/show_bug.cgi?id=500379

(this is still valid, afaict)


I just tried to build Factory package vino-2.26.1-1.1
and the build said

vino-fb.c:445: warning: operation on 'vfb->priv->n_scanline' may be undefined

The source code is

  vfb->priv->n_scanline = ++vfb->priv->n_scanline % N_SCANLINES;

I agree with the compiler. Better code would be

  vfb->priv->n_scanline = (vfb->priv->n_scanline + 1) % N_SCANLINES;
Comment 1 Jonh Wendell 2009-08-06 13:56:03 UTC
Thanks, suggestion applied.