xserver icon indicating copy to clipboard operation
xserver copied to clipboard

screenint_priv.h: fix signed comparison warnings

Open clhin opened this issue 1 month ago • 3 comments

This eliminates roughly 1500 lines of sign compare warnings

clhin avatar Nov 16 '25 16:11 clhin

I think it makes more sense to make numScreens unsigned, but I went with the least potentially disruptive fix for the ABI's sake

clhin avatar Nov 18 '25 00:11 clhin

It seems like changing numScreens to unsigned is the optimal solution here. How does one test if an ABI breakage occurs? Just try to run X11 with the proprietary nvidia driver and observe if it crashes or not?

clhin avatar Nov 22 '25 02:11 clhin

It seems like changing numScreens to unsigned is the optimal solution here. How does one test if an ABI breakage occurs? Just try to run X11 with the proprietary nvidia driver and observe if it crashes or not?

I believe the practically achievable number of screens is magnitudes below the where the upmost bit is ever set. Negative numbers never have been valid here.

metux avatar Nov 22 '25 12:11 metux