[babl] extensions: gggl: conv_rgb8_rgba8(): use 255UL, not 255
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] extensions: gggl: conv_rgb8_rgba8(): use 255UL, not 255
- Date: Sat, 20 Aug 2016 17:39:15 +0000 (UTC)
commit e5af4d543a26da24d389aa80a1111ad49100c3fd
Author: Roman Lebedev <lebedev ri gmail com>
Date: Fri Aug 19 20:05:17 2016 +0300
extensions: gggl: conv_rgb8_rgba8(): use 255UL, not 255
Fixes:
gggl.c:758:62: runtime error: left shift of 255 by 24 places cannot be represented in type 'int'
extensions/gggl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/extensions/gggl.c b/extensions/gggl.c
index 7ab4400..c4b8ce4 100644
--- a/extensions/gggl.c
+++ b/extensions/gggl.c
@@ -755,7 +755,7 @@ conv_rgb8_rgba8 (unsigned char *src, unsigned char *dst, long samples)
long n = samples-1;
while (n--)
{
- *(unsigned int *) dst = (*(unsigned int *) src) | (255 << 24);
+ *(unsigned int *) dst = (*(unsigned int *) src) | (255UL << 24);
src += 3;
dst += 4;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]