* [PATCH] kms: Fix warning XNFprintf is deprecated
@ 2011-02-25 21:07 Sedat Dilek
2011-02-25 22:32 ` Alan Coopersmith
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Sedat Dilek @ 2011-02-25 21:07 UTC (permalink / raw)
To: xorg-driver-ati, dri-devel; +Cc: Sedat Dilek
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
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] kms: Fix warning XNFprintf is deprecated
2011-02-25 21:07 [PATCH] kms: Fix warning XNFprintf is deprecated Sedat Dilek
@ 2011-02-25 22:32 ` Alan Coopersmith
2011-02-26 17:08 ` Alan Coopersmith
[not found] ` <1298668038-16374-1-git-send-email-sedat.dilek-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-02-26 14:32 ` Michel Dänzer
2 siblings, 1 reply; 6+ messages in thread
From: Alan Coopersmith @ 2011-02-25 22:32 UTC (permalink / raw)
To: Sedat Dilek; +Cc: Sedat Dilek, xorg-driver-ati, dri-devel
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.
--
-Alan Coopersmith- alan.coopersmith@oracle.com
Oracle Solaris Platform Engineering: X Window System
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] kms: Fix warning XNFprintf is deprecated
2011-02-25 22:32 ` Alan Coopersmith
@ 2011-02-26 17:08 ` Alan Coopersmith
2011-02-26 20:05 ` Sedat Dilek
0 siblings, 1 reply; 6+ messages in thread
From: Alan Coopersmith @ 2011-02-26 17:08 UTC (permalink / raw)
To: Sedat Dilek; +Cc: Sedat Dilek, xorg-driver-ati, dri-devel
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
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] kms: Fix warning XNFprintf is deprecated
2011-02-26 17:08 ` Alan Coopersmith
@ 2011-02-26 20:05 ` Sedat Dilek
0 siblings, 0 replies; 6+ messages in thread
From: Sedat Dilek @ 2011-02-26 20:05 UTC (permalink / raw)
To: Alan Coopersmith; +Cc: Michel Dänzer, xorg-driver-ati, kdebugs, dri-devel
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 -
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <1298668038-16374-1-git-send-email-sedat.dilek-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] kms: Fix warning XNFprintf is deprecated
[not found] ` <1298668038-16374-1-git-send-email-sedat.dilek-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2011-02-25 23:20 ` Alex Deucher
0 siblings, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2011-02-25 23:20 UTC (permalink / raw)
To: Sedat Dilek
Cc: Sedat Dilek, xorg-driver-ati-go0+a7rfsptAfugRpC6u6w,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
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-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> 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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> 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-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kms: Fix warning XNFprintf is deprecated
2011-02-25 21:07 [PATCH] kms: Fix warning XNFprintf is deprecated Sedat Dilek
2011-02-25 22:32 ` Alan Coopersmith
[not found] ` <1298668038-16374-1-git-send-email-sedat.dilek-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2011-02-26 14:32 ` Michel Dänzer
2 siblings, 0 replies; 6+ messages in thread
From: Michel Dänzer @ 2011-02-26 14:32 UTC (permalink / raw)
To: Sedat Dilek; +Cc: xorg-driver-ati
[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.
--
Earthling Michel Dänzer | http://www.vmware.com
Libre software enthusiast | Debian, X and DRI developer
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-02-26 20:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-25 21:07 [PATCH] kms: Fix warning XNFprintf is deprecated Sedat Dilek
2011-02-25 22:32 ` Alan Coopersmith
2011-02-26 17:08 ` Alan Coopersmith
2011-02-26 20:05 ` Sedat Dilek
[not found] ` <1298668038-16374-1-git-send-email-sedat.dilek-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-02-25 23:20 ` Alex Deucher
2011-02-26 14:32 ` Michel Dänzer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.