Skip to content

Don't call xf86DisableRandR in ABI_VIDEODRV_VERSION 24 & later

Alan Coopersmith requested to merge alanc/xf86-video-savage:gcc into master

The API was removed by Xserver commit dd00e5466a0e4ea313d1860824da4123692827ed in xorg-server-1.20.0 and later.

Found by gcc -Werror=implicit:

savage_driver.c: In function ‘SavagePreInit’:
savage_driver.c:1237:13: error: implicit declaration of function ‘xf86DisableRandR’; did you mean ‘xf86DisableIO’? [-Werror=implicit-function-declaration]
 1237 |             xf86DisableRandR();
      |             ^~~~~~~~~~~~~~~~
      |             xf86DisableIO

Also fix an additional warning from gcc -Wduplicated-branches:

savage_driver.c: In function ‘SavageModeInit’:
savage_driver.c:3731:13: warning: this condition has identical branches [-Wduplicated-branches]
 3731 |     else if (pScrn->bitsPerPixel == 16)
      |             ^

Merge request reports