[Spice-commits] 2 commits - common/pixman_utils.c python_modules/marshal.py

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Jul 11 07:18:18 UTC 2020


 common/pixman_utils.c     |   39 +++++++++++++++++++--------------------
 python_modules/marshal.py |    2 +-
 2 files changed, 20 insertions(+), 21 deletions(-)

New commits:
commit 8e0e13881eb3cbc6210e7ebee430eab9fb941004
Author: Haochen Tong <i at hexchain.org>
Date:   Fri Jul 10 22:20:18 2020 +0200

    marshal: fix clang "missing field initializer" warning on generated files
    
    Signed-off-by: Haochen Tong <i at hexchain.org>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/python_modules/marshal.py b/python_modules/marshal.py
index e9130f3..269dadf 100644
--- a/python_modules/marshal.py
+++ b/python_modules/marshal.py
@@ -419,7 +419,7 @@ def write_protocol_marshaller(writer, proto, is_server, private_marshallers):
         scope = writer.function("spice_message_marshallers_get" +  writer.public_suffix,
                                 "SpiceMessageMarshallers *",
                                 "void")
-        writer.writeln("static SpiceMessageMarshallers marshallers = {NULL};").newline()
+        writer.writeln("static SpiceMessageMarshallers marshallers = {0};").newline()
         for f in sorted(functions.keys()):
             member = f[len("spice_marshall_"):]
             if not member.startswith("msg"):
commit bca74fb6c9c8a15fe75b0e9454bf67b73c95b2d2
Author: Haochen Tong <i at hexchain.org>
Date:   Fri Jul 10 22:15:55 2020 +0200

    pixman_utils: fix clang "unused functions" warning
    
    Signed-off-by: Haochen Tong <i at hexchain.org>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/common/pixman_utils.c b/common/pixman_utils.c
index a3aba0a..44336be 100644
--- a/common/pixman_utils.c
+++ b/common/pixman_utils.c
@@ -1035,26 +1035,6 @@ pixman_image_t *spice_bitmap_try_as_pixman(int src_format,
 #define UINT32_FROM_LE(x) (x)
 #endif
 
-static inline uint32_t rgb_16_555_to_32(uint16_t color)
-{
-    uint32_t ret;
-
-    ret = ((color & 0x001f) << 3) | ((color & 0x001c) >> 2);
-    ret |= ((color & 0x03e0) << 6) | ((color & 0x0380) << 1);
-    ret |= ((color & 0x7c00) << 9) | ((color & 0x7000) << 4);
-
-    return ret;
-}
-
-static inline uint16_t rgb_32_to_16_555(uint32_t color)
-{
-    return
-        (((color) >> 3) & 0x001f) |
-        (((color) >> 6) & 0x03e0) |
-        (((color) >> 9) & 0x7c00);
-}
-
-
 static void bitmap_32_to_32(uint8_t* dest, int dest_stride,
                             uint8_t* src, int src_stride,
                             int width, uint8_t* end)
@@ -1387,6 +1367,25 @@ static void bitmap_1be_16_to_16_555(uint8_t* dest, int dest_stride,
 
 #ifdef NOT_USED_ATM
 
+static inline uint32_t rgb_16_555_to_32(uint16_t color)
+{
+    uint32_t ret;
+
+    ret = ((color & 0x001f) << 3) | ((color & 0x001c) >> 2);
+    ret |= ((color & 0x03e0) << 6) | ((color & 0x0380) << 1);
+    ret |= ((color & 0x7c00) << 9) | ((color & 0x7000) << 4);
+
+    return ret;
+}
+
+static inline uint16_t rgb_32_to_16_555(uint32_t color)
+{
+    return
+        (((color) >> 3) & 0x001f) |
+        (((color) >> 6) & 0x03e0) |
+        (((color) >> 9) & 0x7c00);
+}
+
 static void bitmap_16_to_32(uint8_t* dest, int dest_stride,
                             uint8_t* src, int src_stride,
                             int width, uint8_t* end)


More information about the Spice-commits mailing list