Re: [PATCH] kms: Fix warning XNFprintf is deprecated

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Feb 26, 2011 at 6:08 PM, Alan Coopersmith
<alan.coopersmith@xxxxxxxxxx> wrote:
> 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@xxxxxxxxxx
> Â Â Â Â Oracle Solaris Platform Engineering: X Window System
>
>

[ CC kdebugs@xxxxxxxxxxx (Sorry, could not decrypt your real name) ]

A short hello from my bday party and sorry for the breakage.

I have gone through all replies and I have built and installed a new
ddx against xserver-1.10-rc3 with a v2 of my initial patch (which I
will send separately).

- Sedat -
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux