xserver: Branch 'master' - 4 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jan 28 20:42:05 UTC 2020


 .gitlab-ci.yml              |    2 +-
 hw/kdrive/ephyr/hostx.c     |    2 +-
 hw/xfree86/loader/loadmod.c |    2 +-
 test/misc.c                 |    2 --
 4 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit b6a5389e1789d63c6c61983b973b8559953afc88
Author: Michel Dänzer <mdaenzer at redhat.com>
Date:   Tue Jan 28 18:39:10 2020 +0100

    gitlab-ci: Enable -Werror in the meson build job
    
    There are no warnings left, so let's prevent new ones from creeping
    back in.

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2ab7179e9..6a9be80d2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -81,7 +81,7 @@ meson-build-and-test:
         PIGLIT_DIR: /root/piglit
         XTEST_DIR: /root/xts
     script:
-        - meson -Dprefix=/usr -Dxephyr=true build/
+        - meson -Dprefix=/usr -Dxephyr=true -Dwerror=true build/
         - ninja -j4 -C build/ install
         - ninja -j4 -C build/ test
         - .gitlab-ci/manpages-check
commit 794fd7e563ca9430a4a29a8e9f1923c07c23a480
Author: Michel Dänzer <mdaenzer at redhat.com>
Date:   Tue Jan 28 18:35:45 2020 +0100

    tests/misc: Drop redundant screenInfo declaration
    
    GCC warned about it:
    
    ../test/misc.c:36:19: warning: redundant redeclaration of ‘screenInfo’ [-Wredundant-decls]
       36 | extern ScreenInfo screenInfo;
          |                   ^~~~~~~~~~
    In file included from ../test/misc.c:30:
    ../include/scrnintstr.h:688:29: note: previous declaration of ‘screenInfo’ was here
      688 | extern _X_EXPORT ScreenInfo screenInfo;
          |                             ^~~~~~~~~~

diff --git a/test/misc.c b/test/misc.c
index f1f76cccd..a1d9365c3 100644
--- a/test/misc.c
+++ b/test/misc.c
@@ -33,8 +33,6 @@
 
 #include "tests-common.h"
 
-extern ScreenInfo screenInfo;
-
 static void
 dix_version_compare(void)
 {
commit 4287604425e7ff905036541829896d1ddf7c65d0
Author: Michel Dänzer <mdaenzer at redhat.com>
Date:   Tue Jan 28 18:31:13 2020 +0100

    Xephyr: Cast "red" to char* for xcb_aux_parse_color
    
    xcb_aux_parse_color takes a non-const pointer, even though it doesn't
    modify the string or take ownership of its memory.
    
    Avoids the following warning from GCC:
    
    ../hw/kdrive/ephyr/hostx.c: In function ‘hostx_init’:
    ../hw/kdrive/ephyr/hostx.c:683:30: warning: passing argument 1 of ‘xcb_aux_parse_color’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
      683 |     if (!xcb_aux_parse_color("red", &red, &green, &blue)) {
          |                              ^~~~~
    In file included from ../hw/kdrive/ephyr/hostx.c:50:
    /usr/include/xcb/xcb_aux.h:194:27: note: expected ‘char *’ but argument is of type ‘const char *’
      194 | xcb_aux_parse_color(char *color_name,
          |                     ~~~~~~^~~~~~~~~~

diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index 5b79407e2..6b1d3eb40 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -680,7 +680,7 @@ hostx_init(void)
         }
     }
 
-    if (!xcb_aux_parse_color("red", &red, &green, &blue)) {
+    if (!xcb_aux_parse_color((char*)"red", &red, &green, &blue)) {
         xcb_lookup_color_cookie_t c =
             xcb_lookup_color(HostX.conn, xscreen->default_colormap, 3, "red");
         xcb_lookup_color_reply_t *reply =
commit 65387391a551fff6fec808d48b9bf4b6181cb050
Author: Michel Dänzer <mdaenzer at redhat.com>
Date:   Tue Jan 28 18:22:45 2020 +0100

    loader: strdup const string assigned to local variable name
    
    There's a free(name) at the end of the function.
    
    GCC warned about this:
    
    ../hw/xfree86/loader/loadmod.c: In function ‘LoadModule’:
    ../hw/xfree86/loader/loadmod.c:702:18: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
      702 |         m = name = "int10";
          |                  ^

diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index 81a3a1dd9..f8a44827f 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -699,7 +699,7 @@ LoadModule(const char *module, void *options, const XF86ModReqInfo *modreq,
 
     /* Backward compatibility, vbe and int10 are merged into int10 now */
     if (!strcmp(m, "vbe"))
-        m = name = "int10";
+        m = name = strdup("int10");
 
     for (cim = compiled_in_modules; *cim; cim++)
         if (!strcmp(m, *cim)) {


More information about the xorg-commit mailing list