summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaochen Tong <i@hexchain.org>2020-07-10 22:15:55 +0200
committerFrediano Ziglio <freddy77@gmail.com>2020-07-11 08:17:18 +0100
commitbca74fb6c9c8a15fe75b0e9454bf67b73c95b2d2 (patch)
treec7d1578323eb8c3bb6eb1b2776e5d160b381b762
parent35be203f42c899175a697c282007990543a1977e (diff)
pixman_utils: fix clang "unused functions" warning
Signed-off-by: Haochen Tong <i@hexchain.org> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-rw-r--r--common/pixman_utils.c39
1 files changed, 19 insertions, 20 deletions
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)