[PATCH] kms: Fix warning XNFprintf is deprecated
Alan Coopersmith
alan.coopersmith at oracle.com
Sat Feb 26 09:08:36 PST 2011
On 02/25/11 02:32 PM, Alan Coopersmith wrote:
>> - busid = XNFprintf("pci:%04x:%02x:%02x.%d",
>> + busid = XNFasprintf("pci:%04x:%02x:%02x.%d",
>
> A straight replacement like that, with no #ifdef's will break people building
> for Xorg 1.9 and older, since XNFasprintf is new in Xorg 1.10.
Oops, I failed to notice the other problem with this patch, which was
reported in https://bugs.freedesktop.org/show_bug.cgi?id=34756 - the two
API's are different - the replacement should be:
XNFasprintf(&busid, "pci:%04x:%02x:%02x.%d",
dev->domain, dev->bus, dev->dev, dev->func);
since it follows the style of the libc asprintf() function.
The compiler should have yelled loudly about the original patch when you
tried building it, as Michel noted in his revert message.
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Platform Engineering: X Window System
More information about the dri-devel
mailing list