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 792062 - backends/meta-remote-desktop-session.c:395: bad test ?
backends/meta-remote-desktop-session.c:395: bad test ?
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
3.27.x
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2017-12-30 08:09 UTC by dcb
Modified: 2018-01-24 04:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description dcb 2017-12-30 08:09:16 UTC
backends/meta-remote-desktop-session.c:395:19: warning: logical 'or' of collectively exhaustive tests is always true [-Wlogical-op]

Source code is

 if (steps != -1 || steps != 1)

Maybe better code

 if (steps != -1 && steps != 1)
Comment 1 Jonas Ådahl 2018-01-09 08:53:04 UTC
Indeed. Care to create a patch? You can do so by cloning the mutter repository using git, creating a commit, then uploading it here by using "git format-patch". Alternatively using git-bzr.
Comment 2 dcb 2018-01-09 09:05:57 UTC
(In reply to Jonas Ådahl from comment #1)
> Care to create a patch? 

No thanks. I just find them, I don't fix them.

Someone more familiar with the project would be better placed to create a patch.
Comment 3 Jonas Ådahl 2018-01-09 09:17:45 UTC
(In reply to dcb from comment #2)
> (In reply to Jonas Ådahl from comment #1)
> > Care to create a patch? 
> 
> No thanks. I just find them, I don't fix them.
> 
> Someone more familiar with the project would be better placed to create a
> patch.

Fair enough. Thanks for the find!
Comment 4 dcb 2018-01-09 09:20:38 UTC
(In reply to Jonas Ådahl from comment #3)
> Fair enough. Thanks for the find!

You are welcome. 

It might be a good idea to add compiler flag -Wlogical-op
to your gcc builds to make sure this kind of error doesn't
occur again in the future.