[PATCH xf86-video-intel 18/21] sna: Get rid of -Wno-shift-negative-value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

Use a cast to avoid the "left shift of negative value
[-Wshift-negative-value]" warning, and get rid of the
suppression.

Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
---
 src/sna/meson.build           | 1 -
 src/sna/sna_trapezoids_mono.c | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/sna/meson.build b/src/sna/meson.build
index 7408f63c82db..e1eb25f2be36 100644
--- a/src/sna/meson.build
+++ b/src/sna/meson.build
@@ -131,7 +131,6 @@ sna = static_library('sna',
 		     c_args : [
 		       '-Wno-unused-but-set-variable',
 		       '-Wno-expansion-to-defined',
-		       '-Wno-shift-negative-value',
 		       '-Wno-maybe-uninitialized',
 		       '-Wno-unused-parameter',
 		       '-Wno-unused-function',
diff --git a/src/sna/sna_trapezoids_mono.c b/src/sna/sna_trapezoids_mono.c
index 07a7867d7f09..1582c96c57e8 100644
--- a/src/sna/sna_trapezoids_mono.c
+++ b/src/sna/sna_trapezoids_mono.c
@@ -657,7 +657,7 @@ mono_init(struct mono *c, int num_edges)
 
 	c->head.dy = 0;
 	c->head.height_left = INT_MAX;
-	c->head.x.quo = INT16_MIN << 16;
+	c->head.x.quo = (uint32_t)INT16_MIN << 16;
 	c->head.prev = NULL;
 	c->head.next = &c->tail;
 	c->tail.prev = &c->head;
-- 
2.21.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux