Re: [PATCH xserver] xfree86: Hush some warnings when Xv is disabled

2017-09-25 Thread Eric Anholt
Adam Jackson  writes:

> Spotted by Appveyor:
>
> xf86Crtc.c:3281:1: warning: ‘xf86_crtc_box_area’ defined but not used 
> [-Wunused-function]
>  xf86_crtc_box_area(BoxPtr box)
>  ^~
> xf86Crtc.c:3268:1: warning: ‘x86_crtc_box’ defined but not used 
> [-Wunused-function]
>  x86_crtc_box(xf86CrtcPtr crtc, BoxPtr crtc_box)
>  ^~~~
> xf86Crtc.c:3256:1: warning: ‘x86_crtc_box_intersect’ defined but not used 
> [-Wunused-function]
>  x86_crtc_box_intersect(BoxPtr dest, BoxPtr a, BoxPtr b)
>  ^~

Mesa has started using their _X_UNUSED equivalent for stuff like this,
so that things are compiled either way but DCEed without complaint when
the caller is disabled.  However, this is also a correct cleanup, so:

Reviewed-by: Eric Anholt 


signature.asc
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH xserver] xfree86: Hush some warnings when Xv is disabled

2017-09-25 Thread Adam Jackson
Spotted by Appveyor:

xf86Crtc.c:3281:1: warning: ‘xf86_crtc_box_area’ defined but not used 
[-Wunused-function]
 xf86_crtc_box_area(BoxPtr box)
 ^~
xf86Crtc.c:3268:1: warning: ‘x86_crtc_box’ defined but not used 
[-Wunused-function]
 x86_crtc_box(xf86CrtcPtr crtc, BoxPtr crtc_box)
 ^~~~
xf86Crtc.c:3256:1: warning: ‘x86_crtc_box_intersect’ defined but not used 
[-Wunused-function]
 x86_crtc_box_intersect(BoxPtr dest, BoxPtr a, BoxPtr b)
 ^~

Signed-off-by: Adam Jackson 
---
 hw/xfree86/modes/xf86Crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index fa404d9d4a..1a401af4b5 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -3252,6 +3252,7 @@ xf86ConnectorGetName(xf86ConnectorType connector)
 return _xf86ConnectorNames[connector];
 }
 
+#ifdef XV
 static void
 x86_crtc_box_intersect(BoxPtr dest, BoxPtr a, BoxPtr b)
 {
@@ -3283,7 +3284,6 @@ xf86_crtc_box_area(BoxPtr box)
 return (int) (box->x2 - box->x1) * (int) (box->y2 - box->y1);
 }
 
-#ifdef XV
 /*
  * Return the crtc covering 'box'. If two crtcs cover a portion of
  * 'box', then prefer 'desired'. If 'desired' is NULL, then prefer the crtc
-- 
2.13.5

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel