xserver: Branch 'master' - 3 commits

Julien Cristau jcristau at kemper.freedesktop.org
Sun Oct 26 05:22:18 PDT 2008


 hw/xfree86/common/xf86Init.c |   12 ++++++------
 hw/xfree86/x86emu/ops2.c     |    4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 102c4dac7c521941f52652152b1660cd7f559d56
Author: Julien Cristau <jcristau at debian.org>
Date:   Sun Oct 26 13:17:31 2008 +0100

    x86emu: fix sparse warnings
    
    ops2.c:113:18: warning: Using plain integer as NULL pointer
    ops2.c:207:18: warning: Using plain integer as NULL pointer

diff --git a/hw/xfree86/x86emu/ops2.c b/hw/xfree86/x86emu/ops2.c
index a1eda76..39bd041 100644
--- a/hw/xfree86/x86emu/ops2.c
+++ b/hw/xfree86/x86emu/ops2.c
@@ -110,7 +110,7 @@ Handles opcode 0x0f,0x80-0x8F
 static void x86emuOp2_long_jump(u8 op2)
 {
     s32 target;
-    char *name = 0;
+    char *name = NULL;
     int cond = 0;
 
     /* conditional jump to word offset. */
@@ -204,7 +204,7 @@ static void x86emuOp2_set_byte(u8 op2)
     int mod, rl, rh;
     uint destoffset;
     u8  *destreg;
-    char *name = 0;
+    char *name = NULL;
     int cond = 0;
 
     START_OF_INSTR();
commit ffaaa1a198a77eb6800c08d4613ee1cc0b068ba0
Author: Julien Cristau <jcristau at debian.org>
Date:   Sun Oct 26 13:13:21 2008 +0100

    xfree86: fix compiler warnings in DoModalias()
    
    The precedence of == is higher than that of &, so that code was
    probably buggy.
    
    xf86Init.c: In function 'DoModalias':
    xf86Init.c:300: warning: suggest parentheses around comparison in operand of &
    xf86Init.c:304: warning: suggest parentheses around comparison in operand of &
    xf86Init.c:308: warning: suggest parentheses around comparison in operand of &

diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 7de7a3f..45c116a 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -297,15 +297,15 @@ DoModalias(void)
                  ErrorF("sd%08X", match->subdevice_id);
 
              /* Class */
-             if (match->device_class_mask >> 16 & 0xFF == 0xFF)
+             if ((match->device_class_mask >> 16 & 0xFF) == 0xFF)
                  ErrorF("bc%02X", match->device_class >> 16 & 0xFF);
              else
                  ErrorF("bc*");
-             if (match->device_class_mask >> 8 & 0xFF == 0xFF)
+             if ((match->device_class_mask >> 8 & 0xFF) == 0xFF)
                  ErrorF("sc%02X", match->device_class >> 8 & 0xFF);
              else
                  ErrorF("sc*");
-             if (match->device_class_mask & 0xFF == 0xFF)
+             if ((match->device_class_mask & 0xFF) == 0xFF)
                  ErrorF("i%02X*", match->device_class & 0xFF);
              else
                  ErrorF("i*");
commit 66fd05acd6118102aaaebc230d5c03e0758c6089
Author: Julien Cristau <jcristau at debian.org>
Date:   Sun Oct 26 13:11:41 2008 +0100

    xfree86: Silence compiler warnings about function prototypes
    
    xf86Init.c:136: warning: function declaration isn't a prototype
    xf86Init.c:243: warning: function declaration isn't a prototype
    xf86Init.c:249: warning: function declaration isn't a prototype

diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index c0ff0b3..7de7a3f 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -132,7 +132,7 @@ static Bool formatsDone = FALSE;
 #endif
 
 static void
-xf86PrintBanner()
+xf86PrintBanner(void)
 {
 #if PRE_RELEASE
   ErrorF("\n"
@@ -239,13 +239,13 @@ xf86PrintBanner()
 }
 
 static void
-xf86PrintMarkers()
+xf86PrintMarkers(void)
 {
   LogPrintMarkers();
 }
 
 static void
-DoModalias()
+DoModalias(void)
 {
     int i = -1;
     char **vlist;


More information about the xorg-commit mailing list