From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Coopersmith Subject: Re: [PATCH] kms: Fix warning XNFprintf is deprecated Date: Sat, 26 Feb 2011 09:08:36 -0800 Message-ID: <4D693394.5040903@oracle.com> References: <1298668038-16374-1-git-send-email-sedat.dilek@gmail.com> <4D682E0B.6070704@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4D682E0B.6070704@oracle.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Sedat Dilek Cc: Sedat Dilek , xorg-driver-ati@lists.x.org, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org 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@oracle.com Oracle Solaris Platform Engineering: X Window System