projects
/
platform
/
upstream
/
weston.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad0fe6b
)
tests: Fix undefined left shift in internal-screenshot-test
author
Adam Jackson
<ajax@redhat.com>
Wed, 16 Oct 2019 20:07:47 +0000
(16:07 -0400)
committer
Adam Jackson
<ajax@redhat.com>
Wed, 16 Oct 2019 20:07:47 +0000
(16:07 -0400)
../tests/internal-screenshot-test.c:60:18: runtime error: left shift of 255 by 24 places cannot be represented in type 'int'
tests/internal-screenshot-test.c
patch
|
blob
|
history
diff --git
a/tests/internal-screenshot-test.c
b/tests/internal-screenshot-test.c
index 2a7424b8b89933a142d41396d68a1cc5c49fa947..1963e77eeeff91030fa57443f9a04e7b39c3ce8f 100644
(file)
--- a/
tests/internal-screenshot-test.c
+++ b/
tests/internal-screenshot-test.c
@@
-38,7
+38,7
@@
draw_stuff(pixman_image_t *image)
int w, h;
int stride; /* bytes */
int x, y;
- uint
8
_t r, g, b;
+ uint
32
_t r, g, b;
uint32_t *pixels;
uint32_t *pixel;
pixman_format_code_t fmt;
@@
-57,7
+57,7
@@
draw_stuff(pixman_image_t *image)
g = x + y;
r = y;
pixel = pixels + (y * stride / 4) + x;
- *pixel = (255 << 24) | (r << 16) | (g << 8) | b;
+ *pixel = (255
U
<< 24) | (r << 16) | (g << 8) | b;
}
}