kms: Fix warning XNFprintf is deprecated (v2)
PATCH 1/1 kms: Fix warning XNFprintf is deprecated (v2)
The first take of my patch missed the breakage against pre-1.10 xservers and now I know XNFasprintf() is not a 1:1 replacement for XNFprintf().
The idea for the fix seemed to be so obvious, but as usual "really" test the patch you are sending to any ML.
I am awfully sorry for the overhasty bad hack.
Thanks to Alan and Alex for the help to fix it correctly, now.
--- src/radeon_kms.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
src/radeon_kms.c +5 -0
@@ -409,8 +409,13 @@ static Bool radeon_open_drm_master(ScrnInfoPtr pScrn) goto out; } +#if XORG_VERSION_CURRENT >=XORG_VERSION_NUMERIC (1 ,9 ,99 ,901 ,0 ) +XNFasprintf (&busid,"pci:%04x:%02x:%02x.%d" , + dev->domain, dev->bus, dev->dev, dev->func); +#else busid =XNFprintf ("pci:%04x:%02x:%02x.%d" , dev->domain, dev->bus, dev->dev, dev->func); +#endif info->dri2.drm_fd =drmOpen ("radeon" , busid);if (info->dri2.drm_fd ==-1 ) {
Signature · 6 lines
1.7.4.1 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Dropping dri-devel from CC again, X driver patches aren't really on topic there]
Quoted 3 lines · Sedat Dilek
The first take of my patch missed the breakage against pre-1.10 xservers and now I know
XNFasprintf()is not a 1:1 replacement forXNFprintf().
What would be the point of replacing an API with one that is identical except for the function name?
Quoted 2 lines
The idea for the fix seemed to be so obvious, but as usual "really" test the patch you are sending to any ML.
Indeed. In particular, for a patch that is advertised to fix a warning, the very least one should do is check it doesn't introduce other warnings...
v2 pushed, thanks.
Signature · 6 lines
Earthling Michel Dänzer | http://www.vmware.com Libre software enthusiast | Debian, X and DRI developer _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel