Noticed when building ati/radeon ddx against xserver 1.10-rc3.
[ build.log ] ../../src/radeon_kms.c:412:5: warning: 'XNFprintf' is deprecated (declared at /usr/include/xorg/os.h:273)
Signed-off-by: Sedat Dilek sedat.dilek@gmail.com --- src/radeon_kms.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 158dc57..19b0c74 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -409,7 +409,7 @@ static Bool radeon_open_drm_master(ScrnInfoPtr pScrn) goto out; }
- busid = XNFprintf("pci:%04x:%02x:%02x.%d", + busid = XNFasprintf("pci:%04x:%02x:%02x.%d", dev->domain, dev->bus, dev->dev, dev->func);
info->dri2.drm_fd = drmOpen("radeon", busid);
On 02/25/11 01:07 PM, Sedat Dilek wrote:
Noticed when building ati/radeon ddx against xserver 1.10-rc3.
[ build.log ] ../../src/radeon_kms.c:412:5: warning: 'XNFprintf' is deprecated (declared at /usr/include/xorg/os.h:273)
Signed-off-by: Sedat Dilek sedat.dilek@gmail.com
src/radeon_kms.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 158dc57..19b0c74 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -409,7 +409,7 @@ static Bool radeon_open_drm_master(ScrnInfoPtr pScrn) goto out; }
- 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.
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.
On Sat, Feb 26, 2011 at 6:08 PM, Alan Coopersmith alan.coopersmith@oracle.com 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@oracle.com Oracle Solaris Platform Engineering: X Window System
[ CC kdebugs@hotmail.com (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 -
Pushed a variant of this without breaking pre-1.10 xservers. cb4dc7ab66016d0c980800f8dbf71bbe993889d3
On Fri, Feb 25, 2011 at 4:07 PM, Sedat Dilek sedat.dilek@googlemail.com wrote:
Noticed when building ati/radeon ddx against xserver 1.10-rc3.
[ build.log ] ../../src/radeon_kms.c:412:5: warning: 'XNFprintf' is deprecated (declared at /usr/include/xorg/os.h:273)
Signed-off-by: Sedat Dilek sedat.dilek@gmail.com
src/radeon_kms.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 158dc57..19b0c74 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -409,7 +409,7 @@ static Bool radeon_open_drm_master(ScrnInfoPtr pScrn) goto out; }
- busid = XNFprintf("pci:%04x:%02x:%02x.%d",
- busid = XNFasprintf("pci:%04x:%02x:%02x.%d",
dev->domain, dev->bus, dev->dev, dev->func);
info->dri2.drm_fd = drmOpen("radeon", busid);
1.7.4.1
dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Dropping dri-devel from CC]
On Fre, 2011-02-25 at 22:07 +0100, Sedat Dilek wrote:
Noticed when building ati/radeon ddx against xserver 1.10-rc3.
[ build.log ] ../../src/radeon_kms.c:412:5: warning: 'XNFprintf' is deprecated (declared at /usr/include/xorg/os.h:273)
Signed-off-by: Sedat Dilek sedat.dilek@gmail.com
src/radeon_kms.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 158dc57..19b0c74 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -409,7 +409,7 @@ static Bool radeon_open_drm_master(ScrnInfoPtr pScrn) goto out; }
- busid = XNFprintf("pci:%04x:%02x:%02x.%d",
busid = XNFasprintf("pci:%04x:%02x:%02x.%d", dev->domain, dev->bus, dev->dev, dev->func);
info->dri2.drm_fd = drmOpen("radeon", busid);
Did you test this patch at all? :(
cc1: warnings being treated as errors ../../src/radeon_kms.c: In function ‘radeon_open_drm_master’: ../../src/radeon_kms.c:413: error: passing argument 1 of ‘XNFasprintf’ from incompatible pointer type /usr/local/include/xorg/Xprintf.h:57: note: expected ‘char **’ but argument is of type ‘char *’ ../../src/radeon_kms.c:413: error: passing argument 2 of ‘XNFasprintf’ makes pointer from integer without a cast /usr/local/include/xorg/Xprintf.h:57: note: expected ‘const char * restrict’ but argument is of type ‘uint16_t’ ../../src/radeon_kms.c:413: error: assignment makes pointer from integer without a cast make[2]: *** [radeon_kms.lo] Error 1 make[2]: Leaving directory `/home/michdaen/src/xorg-git/driver/xf86-video-ati/build-ppc/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/michdaen/src/xorg-git/driver/xf86-video-ati/build-ppc' make: *** [all] Error 2 make: Leaving directory `/home/michdaen/src/xorg-git/driver/xf86-video-ati/build-ppc'
https://bugs.freedesktop.org/show_bug.cgi?id=34756 looks like it could be due to this.
I've reverted this for now, please only re-submit after fixing the above and preferably include a statement about the testing performed.
dri-devel@lists.freedesktop.org