summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2019-10-15 16:34:56 -0400
committerAdam Jackson <ajax@redhat.com>2019-10-15 16:34:56 -0400
commit7d6b71b315a7c70c9334aa6849301834c5004014 (patch)
tree7171bff3effe2ba593d7d217af3d26718573ee56
parent880f48b2b474c9d110dc921c2ace89ffee39d0e1 (diff)
downloadpixman-7d6b71b315a7c70c9334aa6849301834c5004014.tar.gz
pixman-fast-path: Fix various undefined left shifts
../pixman/pixman-fast-path.c:3089:23: runtime error: left shift of 154 by 24 places cannot be represented in type 'int'
-rw-r--r--pixman/pixman-fast-path.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pixman/pixman-fast-path.c b/pixman/pixman-fast-path.c
index b4daa26..1ba779b 100644
--- a/pixman/pixman-fast-path.c
+++ b/pixman/pixman-fast-path.c
@@ -908,7 +908,7 @@ fast_composite_add_n_8_8 (pixman_implementation_t *imp,
#define CREATE_BITMASK(n) (0x80000000 >> (n))
#define UPDATE_BITMASK(n) ((n) >> 1)
#else
-#define CREATE_BITMASK(n) (1 << (n))
+#define CREATE_BITMASK(n) (1U << (n))
#define UPDATE_BITMASK(n) ((n) << 1)
#endif
@@ -3086,7 +3086,7 @@ convert_x8r8g8b8 (const uint8_t *row, int x)
static force_inline uint32_t
convert_a8 (const uint8_t *row, int x)
{
- return *(row + x) << 24;
+ return (uint32_t) *(row + x) << 24;
}
static force_inline uint32_t