GNOME Bugzilla – Bug 749876
Cannot build on x86
Last modified: 2021-07-05 13:48:23 UTC
Created attachment 303972 [details] [review] Fix mutter build on x86 We're having this build failure on nixos: core/window.c: In function 'find_monitor_by_winsys_id': core/window.c:3510:27: error: comparison between signed and unsigned integer expressions [-Werr or=sign-compare] if (info->winsys_id == winsys_id) ^ core/window.c: In function 'meta_window_move_resize_internal': core/window.c:3719:28: error: comparison between signed and unsigned integer expressions [-Werr or=sign-compare] if (old_output_winsys_id != window->monitor->winsys_id && ^ cc1: all warnings being treated as errors Makefile:1685: recipe for target 'core/window.lo' failed make[4]: *** [core/window.lo] Error 1 make[4]: Leaving directory '/tmp/nix-build-mutter-3.16.2.drv-0/mutter-3.16.2/src' I'm currently applying the attached patch, not sure if it's sensible.
We have a bit of a mess with this all over the code base. winsys_id should be unsigned everywhere since that's what the low-level variables are (XID aka CARD32 aka unsigned int/long on X11, and uint32_t on DRM). Do you mind submitting a git formatted patch changing it everywhere to guint32 ?
I prefer not using glib typedefs in new code -- just use stdint.h's uint32_t.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/mutter/-/issues/ Thank you for your understanding and your help.