summaryrefslogtreecommitdiff
path: root/src/static_libs
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-06-05 12:00:13 -0700
committerCedric BAIL <cedric@osg.samsung.com>2017-06-05 12:07:57 -0700
commit3fadc0d5affd866d66b25b1a67c15a9a9db9474a (patch)
tree765dc9d2594442f64525a58221dab6f26fe01e99 /src/static_libs
parent7caa81ed9d0eff5289936a51a825af3d1e2e86a5 (diff)
draw: silence warning in a tricky loop/switch statement.
Diffstat (limited to 'src/static_libs')
-rw-r--r--src/static_libs/draw/draw.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/static_libs/draw/draw.h b/src/static_libs/draw/draw.h
index f25f66d..e4f6434 100644
--- a/src/static_libs/draw/draw.h
+++ b/src/static_libs/draw/draw.h
@@ -98,16 +98,26 @@ draw_memset32(uint32_t *dest, uint32_t value, int length)
98 if (length <= 0) 98 if (length <= 0)
99 return; 99 return;
100 100
101 // Cute hack to align future memcopy operation
102 // and do unroll the loop a bit. Not sure it is
103 // the most efficient, but will do for now.
101 n = (length + 7) / 8; 104 n = (length + 7) / 8;
102 switch (length & 0x07) 105 switch (length & 0x07)
103 { 106 {
104 case 0: do { *dest++ = value; 107 case 0: do { *dest++ = value;
108 EINA_FALLTHROUGH;
105 case 7: *dest++ = value; 109 case 7: *dest++ = value;
110 EINA_FALLTHROUGH;
106 case 6: *dest++ = value; 111 case 6: *dest++ = value;
112 EINA_FALLTHROUGH;
107 case 5: *dest++ = value; 113 case 5: *dest++ = value;
114 EINA_FALLTHROUGH;
108 case 4: *dest++ = value; 115 case 4: *dest++ = value;
116 EINA_FALLTHROUGH;
109 case 3: *dest++ = value; 117 case 3: *dest++ = value;
118 EINA_FALLTHROUGH;
110 case 2: *dest++ = value; 119 case 2: *dest++ = value;
120 EINA_FALLTHROUGH;
111 case 1: *dest++ = value; 121 case 1: *dest++ = value;
112 } while (--n > 0); 122 } while (--n > 0);
113 } 123 }