summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2019-09-15 12:51:35 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2019-09-19 19:22:18 +0300
commite95e9d41ca87185d4065be35e862348d24f455f3 (patch)
tree7b8c461786d8918b33d2af1915d0285e8707922a
parentfbe15cf431deadd984023e9bdfa4dd2ac2f9cf1b (diff)
sna: Get rid of -Wno-shift-negative-value
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@linux.intel.com>
-rw-r--r--src/sna/meson.build1
-rw-r--r--src/sna/sna_trapezoids_mono.c2
2 files changed, 1 insertions, 2 deletions
diff --git a/src/sna/meson.build b/src/sna/meson.build
index 7408f63c..e1eb25f2 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 07a7867d..1582c96c 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;