xserver: Branch 'master' - 10 commits

Keith Packard keithp at kemper.freedesktop.org
Wed Jun 29 19:01:55 PDT 2011


 Xext/xvmc.c                |   11 ++++++-----
 configure.ac               |    2 +-
 fb/fb24_32.c               |    4 ++--
 fb/fbarc.c                 |    9 +++------
 fb/fbfill.c                |    6 +++---
 fb/fbgc.c                  |    4 ++--
 fb/fbpush.c                |    2 +-
 hw/dmx/config/xdmxconfig.c |    8 ++++----
 hw/dmx/examples/xbell.c    |    3 +--
 miext/shadow/shpacked.c    |    2 +-
 miext/shadow/shplanar.c    |    2 +-
 miext/shadow/shplanar8.c   |    2 +-
 miext/shadow/shrotate.c    |    2 +-
 miext/shadow/shrotpack.h   |    2 +-
 miext/shadow/shrotpackYX.h |    2 +-
 xfixes/cursor.c            |    4 ++--
 xfixes/region.c            |    2 --
 17 files changed, 31 insertions(+), 36 deletions(-)

New commits:
commit d5ca33ca2dd08e8436439da926d2dedaabc268fa
Merge: 38d55f0... 4edf49d...
Author: Keith Packard <keithp at keithp.com>
Date:   Wed Jun 29 18:54:33 2011 -0700

    Merge remote-tracking branch 'kibi/master'

commit 4edf49d032028aa4b9887d02b926b0c372c4451d
Author: Cyril Brulebois <kibi at debian.org>
Date:   Tue May 24 18:33:18 2011 +0200

    dmx/examples: Fix missing key_click_percent assignment.
    
    Thanks to gcc's -Wunused-but-set-variable, stop ignoring the percent
    parameter, and add it to the XKeyboardControl structure before the
    XChangeKeyboardControl call.
    
    This warning goes away accordingly:
    |   CC     xbell-xbell.o
    | xbell.c: In function ‘main’:
    | xbell.c:74:22: warning: variable ‘percent’ set but not used [-Wunused-but-set-variable]
    
    Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
    Signed-off-by: Cyril Brulebois <kibi at debian.org>

diff --git a/hw/dmx/examples/xbell.c b/hw/dmx/examples/xbell.c
index f3e3be1..79419d3 100644
--- a/hw/dmx/examples/xbell.c
+++ b/hw/dmx/examples/xbell.c
@@ -71,7 +71,6 @@ int main(int argc, char **argv)
     XKeyboardControl kc;
     XKeyboardState   ks;
     unsigned long    vm;
-    int              percent;
 
     if (argc != 5) {
         printf("Usage: xbell percent baseVolume pitch duration\n");
@@ -81,7 +80,7 @@ int main(int argc, char **argv)
     vm               = (KBBellPercent
                         | KBBellPitch
                         | KBBellDuration);
-    percent          = atoi(argv[1]);
+    kc.key_click_percent = atoi(argv[1]);
     kc.bell_percent  = atoi(argv[2]);
     kc.bell_pitch    = atoi(argv[3]);
     kc.bell_duration = atoi(argv[4]);
commit 33dad2b74e3489c8a6b5fa574172d6cd2b6de037
Author: Cyril Brulebois <kibi at debian.org>
Date:   Tue May 24 18:33:17 2011 +0200

    hw/dmx: Stop using variables for text widgets.
    
    They are unused in the sense they're not getting any callback set up, so
    there's no point in storing them into variables. Keep the initial
    alignment of the parameters to try and reduce the diff noise.
    
    Those warnings go away accordingly:
    |   CC     xdmxconfig-xdmxconfig.o
    | xdmxconfig.c: In function ‘main’:
    | xdmxconfig.c:881:29: warning: variable ‘quittext’ set but not used [-Wunused-but-set-variable]
    | xdmxconfig.c:880:53: warning: variable ‘abouttext’ set but not used [-Wunused-but-set-variable]
    
    Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
    Signed-off-by: Cyril Brulebois <kibi at debian.org>

diff --git a/hw/dmx/config/xdmxconfig.c b/hw/dmx/config/xdmxconfig.c
index c67077a..2de7f2b 100644
--- a/hw/dmx/config/xdmxconfig.c
+++ b/hw/dmx/config/xdmxconfig.c
@@ -877,8 +877,8 @@ int main(int argc, char **argv)
     Widget         parent, menubox, bottombox, databox, canvasbox;
     Widget         filebutton, helpbutton;
     Widget         filemenu, openbutton, savebutton, quitbutton;
-    Widget         helpmenu, aboutbutton, aboutbox, abouttext, aboutok;
-    Widget         quitbox, quittext, quitok, quitcan;
+    Widget         helpmenu, aboutbutton, aboutbox, aboutok;
+    Widget         quitbox, quitok, quitcan;
     Widget         ncbutton;
     Widget         canbutton;
     Widget         ecbox, ecokbutton, eccanbutton;
@@ -1096,7 +1096,7 @@ int main(int argc, char **argv)
                                         toplevel, NULL);
     aboutbox     = XtVaCreateManagedWidget("aboutbox", boxWidgetClass,
                                            aboutpopup, NULL);
-    abouttext    = XtVaCreateManagedWidget("abouttext", labelWidgetClass,
+                   XtVaCreateManagedWidget("abouttext", labelWidgetClass,
                                            aboutbox,
                                            XtNlabel, DMX_INFO,
                                            NULL);
@@ -1108,7 +1108,7 @@ int main(int argc, char **argv)
                                         toplevel, NULL);
     quitbox      = XtVaCreateManagedWidget("quitbox", boxWidgetClass,
                                            quitpopup, NULL);
-    quittext     = XtVaCreateManagedWidget("quittext", labelWidgetClass,
+                   XtVaCreateManagedWidget("quittext", labelWidgetClass,
                                            quitbox,
                                            XtNlabel,
                                            "Changes to the configuration\n"
commit 34a9f2a90d34a2ab7ecf56d329e75e8da569f939
Author: Cyril Brulebois <kibi at debian.org>
Date:   Tue May 24 18:33:17 2011 +0200

    xfixes: Remove unused variable.
    
    The last use of pScreen in ProcXFixesSetPictureClipRegion was removed in
    aa7096ca6f108e399d9916639cf20c57f9776305 so remove it entirely.
    
    Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
    Signed-off-by: Cyril Brulebois <kibi at debian.org>

diff --git a/xfixes/region.c b/xfixes/region.c
index f493496..be2d391 100644
--- a/xfixes/region.c
+++ b/xfixes/region.c
@@ -756,12 +756,10 @@ ProcXFixesSetPictureClipRegion (ClientPtr client)
 {
     PicturePtr		pPicture;
     RegionPtr		pRegion;
-    ScreenPtr		pScreen;
     REQUEST(xXFixesSetPictureClipRegionReq);
     
     REQUEST_SIZE_MATCH (xXFixesSetPictureClipRegionReq);
     VERIFY_PICTURE(pPicture, stuff->picture, client, DixSetAttrAccess);
-    pScreen = pPicture->pDrawable->pScreen;
     VERIFY_REGION_OR_NONE(pRegion, stuff->region, client, DixReadAccess);
     
     return SetPictureClipRegion (pPicture, stuff->xOrigin, stuff->yOrigin,
commit ad0d0833d45ea24d7af1f724b9905133fe3b065f
Author: Cyril Brulebois <kibi at debian.org>
Date:   Tue May 24 18:33:17 2011 +0200

    xfixes: Mark some variables as unused.
    
    Calling Unwrap() is just a way of performing an assignment while keeping a
    backup of the original value. In the CursorCloseScreen function, the backup
    value doesn't seem to be useful, but Unwrap() is used anyway (probably to stay
    in line with other functions). As a consequence, mark those variables as unused.
    
    The following warnings go away accordingly:
    |   CC     cursor.lo
    | cursor.c: In function 'CursorCloseScreen':
    | cursor.c:186:26: warning: variable 'display_proc' set but not used [-Wunused-but-set-variable]
    | cursor.c:185:24: warning: variable 'close_proc' set but not used [-Wunused-but-set-variable]
    
    Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
    Signed-off-by: Cyril Brulebois <kibi at debian.org>

diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index 01eb70d..ecbed40 100644
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -196,8 +196,8 @@ CursorCloseScreen (int index, ScreenPtr pScreen)
 {
     CursorScreenPtr	cs = GetCursorScreen (pScreen);
     Bool		ret;
-    CloseScreenProcPtr	close_proc;
-    DisplayCursorProcPtr display_proc;
+    _X_UNUSED CloseScreenProcPtr	close_proc;
+    _X_UNUSED DisplayCursorProcPtr	display_proc;
     ConstrainCursorHarderProcPtr constrain_proc;
 
     Unwrap (cs, pScreen, CloseScreen, close_proc);
commit f41ac25d932ef34ab912201ab5ce65f85f2ff171
Author: Cyril Brulebois <kibi at debian.org>
Date:   Tue May 24 18:33:17 2011 +0200

    miext: Mark some variables as unused.
    
    There's no use for the values set through the various macro calls
    (fbGetDrawable and fbGetDrawablePixmap), so mark those variables as unused.
    
    The following warnings go away accordingly:
    |   CC     shpacked.lo
    | shpacked.c: In function 'shadowUpdatePacked':
    | shpacked.c:55:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shpacked.c:55:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shplanar8.lo
    | shplanar8.c: In function 'shadowUpdatePlanar4x8':
    | shplanar8.c:105:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shplanar8.c:105:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shplanar.lo
    | shplanar.c: In function 'shadowUpdatePlanar4':
    | shplanar.c:101:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shplanar.c:101:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot16pack_180.lo
    | In file included from shrot16pack_180.c:31:0:
    | shrotpack.h: In function 'shadowUpdateRotate16_180':
    | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot16pack_270.lo
    | In file included from shrot16pack_270.c:31:0:
    | shrotpack.h: In function 'shadowUpdateRotate16_270':
    | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot16pack_270YX.lo
    | In file included from shrot16pack_270YX.c:31:0:
    | shrotpackYX.h: In function 'shadowUpdateRotate16_270YX':
    | shrotpackYX.h:72:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpackYX.h:72:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot16pack_90.lo
    | In file included from shrot16pack_90.c:31:0:
    | shrotpack.h: In function 'shadowUpdateRotate16_90':
    | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot16pack_90YX.lo
    | In file included from shrot16pack_90YX.c:31:0:
    | shrotpackYX.h: In function 'shadowUpdateRotate16_90YX':
    | shrotpackYX.h:72:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpackYX.h:72:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot16pack.lo
    | In file included from shrot16pack.c:30:0:
    | shrotpack.h: In function 'shadowUpdateRotate16':
    | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot32pack_180.lo
    | In file included from shrot32pack_180.c:31:0:
    | shrotpack.h: In function 'shadowUpdateRotate32_180':
    | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot32pack_270.lo
    | In file included from shrot32pack_270.c:31:0:
    | shrotpack.h: In function 'shadowUpdateRotate32_270':
    | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot32pack_90.lo
    | In file included from shrot32pack_90.c:31:0:
    | shrotpack.h: In function 'shadowUpdateRotate32_90':
    | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot32pack.lo
    | In file included from shrot32pack.c:30:0:
    | shrotpack.h: In function 'shadowUpdateRotate32':
    | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot8pack_180.lo
    | In file included from shrot8pack_180.c:31:0:
    | shrotpack.h: In function 'shadowUpdateRotate8_180':
    | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot8pack_270.lo
    | In file included from shrot8pack_270.c:31:0:
    | shrotpack.h: In function 'shadowUpdateRotate8_270':
    | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot8pack_90.lo
    | In file included from shrot8pack_90.c:31:0:
    | shrotpack.h: In function 'shadowUpdateRotate8_90':
    | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot8pack.lo
    | In file included from shrot8pack.c:30:0:
    | shrotpack.h: In function 'shadowUpdateRotate8':
    | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrotate.lo
    | shrotate.c: In function 'shadowUpdateRotatePacked':
    | shrotate.c:62:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotate.c:62:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shpacked.lo
    | shpacked.c: In function 'shadowUpdatePacked':
    | shpacked.c:55:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shpacked.c:55:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shplanar8.lo
    | shplanar8.c: In function 'shadowUpdatePlanar4x8':
    | shplanar8.c:105:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shplanar8.c:105:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shplanar.lo
    | shplanar.c: In function 'shadowUpdatePlanar4':
    | shplanar.c:101:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shplanar.c:101:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot16pack_180.lo
    | In file included from shrot16pack_180.c:31:0:
    | shrotpack.h: In function 'shadowUpdateRotate16_180':
    | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot16pack_270.lo
    | In file included from shrot16pack_270.c:31:0:
    | shrotpack.h: In function 'shadowUpdateRotate16_270':
    | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot16pack_270YX.lo
    | In file included from shrot16pack_270YX.c:31:0:
    | shrotpackYX.h: In function 'shadowUpdateRotate16_270YX':
    | shrotpackYX.h:72:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpackYX.h:72:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot16pack_90.lo
    | In file included from shrot16pack_90.c:31:0:
    | shrotpack.h: In function 'shadowUpdateRotate16_90':
    | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot16pack_90YX.lo
    | In file included from shrot16pack_90YX.c:31:0:
    | shrotpackYX.h: In function 'shadowUpdateRotate16_90YX':
    | shrotpackYX.h:72:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpackYX.h:72:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot16pack.lo
    | In file included from shrot16pack.c:30:0:
    | shrotpack.h: In function 'shadowUpdateRotate16':
    | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot32pack_180.lo
    | In file included from shrot32pack_180.c:31:0:
    | shrotpack.h: In function 'shadowUpdateRotate32_180':
    | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot32pack_270.lo
    | In file included from shrot32pack_270.c:31:0:
    | shrotpack.h: In function 'shadowUpdateRotate32_270':
    | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot32pack_90.lo
    | In file included from shrot32pack_90.c:31:0:
    | shrotpack.h: In function 'shadowUpdateRotate32_90':
    | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot32pack.lo
    | In file included from shrot32pack.c:30:0:
    | shrotpack.h: In function 'shadowUpdateRotate32':
    | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot8pack_180.lo
    | In file included from shrot8pack_180.c:31:0:
    | shrotpack.h: In function 'shadowUpdateRotate8_180':
    | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot8pack_270.lo
    | In file included from shrot8pack_270.c:31:0:
    | shrotpack.h: In function 'shadowUpdateRotate8_270':
    | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot8pack_90.lo
    | In file included from shrot8pack_90.c:31:0:
    | shrotpack.h: In function 'shadowUpdateRotate8_90':
    | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrot8pack.lo
    | In file included from shrot8pack.c:30:0:
    | shrotpack.h: In function 'shadowUpdateRotate8':
    | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    |   CC     shrotate.lo
    | shrotate.c:62:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
    | shrotate.c:62:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
    
    Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
    Signed-off-by: Cyril Brulebois <kibi at debian.org>

diff --git a/miext/shadow/shpacked.c b/miext/shadow/shpacked.c
index 06606bc..c37dca1 100644
--- a/miext/shadow/shpacked.c
+++ b/miext/shadow/shpacked.c
@@ -52,7 +52,7 @@ shadowUpdatePacked (ScreenPtr	    pScreen,
     FbStride	shaStride;
     int		scrBase, scrLine, scr;
     int		shaBpp;
-    int		shaXoff, shaYoff; /* XXX assumed to be zero */
+    _X_UNUSED int	shaXoff, shaYoff;
     int		x, y, w, h, width;
     int         i;
     FbBits	*winBase = NULL, *win;
diff --git a/miext/shadow/shplanar.c b/miext/shadow/shplanar.c
index 9ca3f3f..3504051 100644
--- a/miext/shadow/shplanar.c
+++ b/miext/shadow/shplanar.c
@@ -98,7 +98,7 @@ shadowUpdatePlanar4 (ScreenPtr	    pScreen,
     FbStride	shaStride;
     int		scrBase, scrLine, scr;
     int		shaBpp;
-    int		shaXoff, shaYoff;   /* XXX assumed to be zero */
+    _X_UNUSED int	shaXoff, shaYoff;
     int		x, y, w, h, width;
     int         i;
     CARD32	*winBase = NULL, *win;
diff --git a/miext/shadow/shplanar8.c b/miext/shadow/shplanar8.c
index f8b255d..d064814 100644
--- a/miext/shadow/shplanar8.c
+++ b/miext/shadow/shplanar8.c
@@ -102,7 +102,7 @@ shadowUpdatePlanar4x8 (ScreenPtr	pScreen,
     FbStride	shaStride;
     int		scrBase, scrLine, scr;
     int		shaBpp;
-    int		shaXoff, shaYoff;   /* XXX assumed to be zero */
+    _X_UNUSED int	shaXoff, shaYoff;
     int		x, y, w, h, width;
     int         i;
     CARD32	*winBase = NULL, *win;
diff --git a/miext/shadow/shrotate.c b/miext/shadow/shrotate.c
index c389826..0901203 100644
--- a/miext/shadow/shrotate.c
+++ b/miext/shadow/shrotate.c
@@ -59,7 +59,7 @@ shadowUpdateRotatePacked (ScreenPtr	pScreen,
     FbBits	*shaBits;
     FbStride	shaStride;
     int		shaBpp;
-    int		shaXoff, shaYoff;
+    _X_UNUSED int	shaXoff, shaYoff;
     int		box_x1, box_x2, box_y1, box_y2;
     int		sha_x1 = 0, sha_y1 = 0;
     int		scr_x1 = 0, scr_x2 = 0, scr_y1 = 0, scr_y2 = 0, scr_w, scr_h;
diff --git a/miext/shadow/shrotpack.h b/miext/shadow/shrotpack.h
index 2d1a87c..16afff1 100644
--- a/miext/shadow/shrotpack.h
+++ b/miext/shadow/shrotpack.h
@@ -106,7 +106,7 @@ FUNC (ScreenPtr	    pScreen,
     FbStride	shaStride;
     int		scrBase, scrLine, scr;
     int		shaBpp;
-    int		shaXoff, shaYoff;   /* XXX assumed to be zero */
+    _X_UNUSED int	shaXoff, shaYoff;
     int		x, y, w, h, width;
     int         i;
     Data	*winBase = NULL, *win;
diff --git a/miext/shadow/shrotpackYX.h b/miext/shadow/shrotpackYX.h
index 7d36bd1..d7b01ec 100644
--- a/miext/shadow/shrotpackYX.h
+++ b/miext/shadow/shrotpackYX.h
@@ -69,7 +69,7 @@ FUNC (ScreenPtr	    pScreen,
     Data	*shaBase, *shaLine, *sha;
     FbStride	shaStride, winStride;
     int		shaBpp;
-    int		shaXoff, shaYoff;   /* XXX assumed to be zero */
+    _X_UNUSED int	shaXoff, shaYoff;
     int		x, y, w, h;
     Data	*winBase, *win, *winLine;
     CARD32	winSize;
commit fe6f489d21d77aacf0a073883625619018d764b3
Author: Cyril Brulebois <kibi at debian.org>
Date:   Tue May 24 18:33:17 2011 +0200

    fb: Mark some variables as unused.
    
    There's no use for the values set through the various macro calls
    (fbGetDrawable and fbGetDrawablePixmap), so mark those variables as unused.
    
    The following warnings go away accordingly:
    |   CC     libfb_la-fb24_32.lo
    | fb24_32.c: In function 'fb24_32ReformatTile':
    | fb24_32.c:544:19: warning: variable 'newYoff' set but not used [-Wunused-but-set-variable]
    | fb24_32.c:544:10: warning: variable 'newXoff' set but not used [-Wunused-but-set-variable]
    | fb24_32.c:543:19: warning: variable 'oldYoff' set but not used [-Wunused-but-set-variable]
    | fb24_32.c:543:10: warning: variable 'oldXoff' set but not used [-Wunused-but-set-variable]
    |   CC     libfb_la-fbfill.lo
    | fbfill.c: In function 'fbFill':
    | fbfill.c:72:21: warning: variable 'stipYoff' set but not used [-Wunused-but-set-variable]
    | fbfill.c:72:11: warning: variable 'stipXoff' set but not used [-Wunused-but-set-variable]
    | fbfill.c:100:21: warning: variable 'stipYoff' set but not used [-Wunused-but-set-variable]
    | fbfill.c:100:11: warning: variable 'stipXoff' set but not used [-Wunused-but-set-variable]
    | fbfill.c:142:20: warning: variable 'tileYoff' set but not used [-Wunused-but-set-variable]
    | fbfill.c:142:10: warning: variable 'tileXoff' set but not used [-Wunused-but-set-variable]
    |   CC     libfb_la-fbgc.lo
    | fbgc.c: In function 'fbPadPixmap':
    | fbgc.c:92:19: warning: variable 'yOff' set but not used [-Wunused-but-set-variable]
    | fbgc.c:92:13: warning: variable 'xOff' set but not used [-Wunused-but-set-variable]
    | fbgc.c: In function 'fbCanEvenStipple':
    | fbgc.c:166:23: warning: variable 'stipYoff' set but not used [-Wunused-but-set-variable]
    | fbgc.c:166:13: warning: variable 'stipXoff' set but not used [-Wunused-but-set-variable]
    |   CC     libfb_la-fbpush.lo
    | fbpush.c: In function 'fbPushPixels':
    | fbpush.c:238:20: warning: variable 'stipYoff' set but not used [-Wunused-but-set-variable]
    | fbpush.c:238:10: warning: variable 'stipXoff' set but not used [-Wunused-but-set-variable]
    
    Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
    Signed-off-by: Cyril Brulebois <kibi at debian.org>

diff --git a/fb/fb24_32.c b/fb/fb24_32.c
index 2e600ed..033fa46 100644
--- a/fb/fb24_32.c
+++ b/fb/fb24_32.c
@@ -540,8 +540,8 @@ fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel)
     FbStride	oldStride, newStride;
     int		oldBpp, newBpp;
     fb24_32BltFunc  blt;
-    int		oldXoff, oldYoff;
-    int		newXoff, newYoff;
+    _X_UNUSED int   oldXoff, oldYoff;
+    _X_UNUSED int   newXoff, newYoff;
 
     pNewTile = pScreen->CreatePixmap(pScreen, pOldTile->drawable.width,
 				     pOldTile->drawable.height,
diff --git a/fb/fbfill.c b/fb/fbfill.c
index 801a0d0..e62a48a 100644
--- a/fb/fbfill.c
+++ b/fb/fbfill.c
@@ -69,7 +69,7 @@ fbFill (DrawablePtr pDrawable,
 	    FbBits	*stip;
 	    FbStride    stipStride;
 	    int		stipBpp;
-	    int		stipXoff, stipYoff; /* XXX assumed to be zero */
+	    _X_UNUSED int	stipXoff, stipYoff;
 
 	    if (pGC->fillStyle == FillStippled)
 		alu = FbStipple1Rop(pGC->alu,pGC->fgPixel);
@@ -97,7 +97,7 @@ fbFill (DrawablePtr pDrawable,
 	    FbStip	*stip;
 	    FbStride    stipStride;
 	    int		stipBpp;
-	    int		stipXoff, stipYoff; /* XXX assumed to be zero */
+	    _X_UNUSED int	stipXoff, stipYoff;
 	    FbBits	fgand, fgxor, bgand, bgxor;
 
 	    fgand = pPriv->and;
@@ -139,7 +139,7 @@ fbFill (DrawablePtr pDrawable,
 	int	    tileBpp;
 	int	    tileWidth;
 	int	    tileHeight;
-	int	    tileXoff, tileYoff; /* XXX assumed to be zero */
+	_X_UNUSED int	tileXoff, tileYoff;
 	
 	fbGetDrawable (&pTile->drawable, tile, tileStride, tileBpp, tileXoff, tileYoff);
 	tileWidth = pTile->drawable.width;
diff --git a/fb/fbgc.c b/fb/fbgc.c
index cc504c1..8108c3a 100644
--- a/fb/fbgc.c
+++ b/fb/fbgc.c
@@ -89,7 +89,7 @@ fbPadPixmap (PixmapPtr pPixmap)
     int	    w;
     int     stride;
     int     bpp;
-    int     xOff, yOff;
+    _X_UNUSED int xOff, yOff;
 
     fbGetDrawable (&pPixmap->drawable, bits, stride, bpp, xOff, yOff);
 
@@ -163,7 +163,7 @@ fbCanEvenStipple (PixmapPtr pStipple, int bpp)
     FbBits  *bits;
     int	    stride;
     int	    stip_bpp;
-    int	    stipXoff, stipYoff;
+    _X_UNUSED int stipXoff, stipYoff;
     int	    h;
 
     /* can't even stipple 24bpp drawables */
diff --git a/fb/fbpush.c b/fb/fbpush.c
index 9d82718..8dd7c2b 100644
--- a/fb/fbpush.c
+++ b/fb/fbpush.c
@@ -235,7 +235,7 @@ fbPushPixels (GCPtr	    pGC,
     FbStip	*stip;
     FbStride	stipStride;
     int		stipBpp;
-    int		stipXoff, stipYoff; /* Assumed to be zero */
+    _X_UNUSED int	stipXoff, stipYoff;
 
     fbGetStipDrawable (&pBitmap->drawable, stip, stipStride, stipBpp, stipXoff, stipYoff);
 
commit 8da16898d9de5da1f80b789f0b371070968285f8
Author: Cyril Brulebois <kibi at debian.org>
Date:   Tue May 24 18:33:17 2011 +0200

    fb: Simplify logic, get rid of set but unused variable.
    
    wrapped is only useful is FB_ACCESS_WRAPPER is set; simplify the logic
    accordingly, and only set it when that's defined.
    
    The following warning goes away accordingly:
    |   CC     libfb_la-fbarc.lo
    | fbarc.c: In function 'fbPolyArc':
    | fbarc.c:71:11: warning: variable 'wrapped' set but not used [-Wunused-but-set-variable]
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
    Signed-off-by: Cyril Brulebois <kibi at debian.org>

diff --git a/fb/fbarc.c b/fb/fbarc.c
index a0c5343..e54c804 100644
--- a/fb/fbarc.c
+++ b/fb/fbarc.c
@@ -68,15 +68,12 @@ fbPolyArc (DrawablePtr	pDrawable,
 	    BoxRec	box;
 	    int		x2, y2;
 	    RegionPtr	cclip;
-	    int		wrapped = 0;
+#ifdef FB_ACCESS_WRAPPER
+	    int		wrapped = 1;
+#endif
 	    
 	    cclip = fbGetCompositeClip (pGC);
 	    fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
-#ifdef FB_ACCESS_WRAPPER
-	    wrapped = 1;
-#else
-	    wrapped = 0;
-#endif
 	    while (narcs--)
 	    {
 		if (miCanZeroArc (parcs))
commit 9a8bfc2c06f0a9206b64ae01a783cf5513f021a6
Author: Cyril Brulebois <kibi at debian.org>
Date:   Tue May 24 18:33:16 2011 +0200

    configure: Bump dependency on xproto.
    
    Bumping this dependency means some additional macros can be used, like
    _X_UNUSED.
    
    Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
    Signed-off-by: Cyril Brulebois <kibi at debian.org>

diff --git a/configure.ac b/configure.ac
index 22566c9..9b831b0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -785,7 +785,7 @@ WINDOWSWMPROTO="windowswmproto"
 APPLEWMPROTO="applewmproto >= 1.4"
 
 dnl Core modules for most extensions, et al.
-SDK_REQUIRED_MODULES="[xproto >= 7.0.17] [randrproto >= 1.2.99.3] [renderproto >= 0.11] [xextproto >= 7.1.99] [inputproto >= 1.9.99.902] [kbproto >= 1.0.3] fontsproto"
+SDK_REQUIRED_MODULES="[xproto >= 7.0.22] [randrproto >= 1.2.99.3] [renderproto >= 0.11] [xextproto >= 7.1.99] [inputproto >= 1.9.99.902] [kbproto >= 1.0.3] fontsproto"
 # Make SDK_REQUIRED_MODULES available for inclusion in xorg-server.pc
 AC_SUBST(SDK_REQUIRED_MODULES)
 
commit 9da5aa09d70e26dd4d2ef878a21317dae7bf24de
Author: Cyril Brulebois <kibi at debian.org>
Date:   Tue May 24 18:33:11 2011 +0200

    Xext: Fix buggy checks.
    
    XvMCScreenKey is defined as XvMCScreenKeyRec's address, so will never be
    NULL. Use the check proposed by Alan Coopersmith and Jeremy Huddleston
    instead.
    
    Those warnings go away accordingly:
    |   CC     xvmc.lo
    | xvmc.c: In function 'ProcXvMCListSubpictureTypes':
    | xvmc.c:490:22: warning: the comparison will always evaluate as 'false' for the address of 'XvMCScreenKeyRec' will never be NULL [-Waddress]
    | xvmc.c: In function 'XvMCExtensionInit':
    | xvmc.c:671:21: warning: the comparison will always evaluate as 'false' for the address of 'XvMCScreenKeyRec' will never be NULL [-Waddress]
    | xvmc.c: In function 'XvMCFindXvImage':
    | xvmc.c:749:22: warning: the comparison will always evaluate as 'false' for the address of 'XvMCScreenKeyRec' will never be NULL [-Waddress]
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Signed-off-by: Cyril Brulebois <kibi at debian.org>

diff --git a/Xext/xvmc.c b/Xext/xvmc.c
index 4d29941..bc78b55 100644
--- a/Xext/xvmc.c
+++ b/Xext/xvmc.c
@@ -487,8 +487,8 @@ ProcXvMCListSubpictureTypes(ClientPtr client)
 
     pScreen = pPort->pAdaptor->pScreen;
 
-    if(XvMCScreenKey == NULL) /* No XvMC adaptors */
-        return BadMatch;
+    if (!dixPrivateKeyRegistered(XvMCScreenKey))
+        return BadMatch;   /* No XvMC adaptors */
 
     if(!(pScreenPriv = XVMC_GET_PRIVATE(pScreen)))
         return BadMatch;   /* None this screen */
@@ -668,8 +668,8 @@ XvMCExtensionInit(void)
 {
    ExtensionEntry *extEntry;
 
-   if(XvMCScreenKey == NULL) /* nobody supports it */
-	return; 
+   if (!dixPrivateKeyRegistered(XvMCScreenKey))
+	return;
 
    if(!(XvMCRTContext = CreateNewResourceType(XvMCDestroyContextRes,
 					      "XvMCRTContext")))
@@ -746,7 +746,8 @@ XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id)
     XvMCAdaptorPtr adaptor = NULL;
     int i;
 
-    if(XvMCScreenKey == NULL) return NULL;
+    if (!dixPrivateKeyRegistered(XvMCScreenKey))
+        return NULL;
 
     if(!(pScreenPriv = XVMC_GET_PRIVATE(pScreen))) 
         return NULL;


More information about the xorg-commit mailing list