diff options
author | Cedric BAIL <cedric@osg.samsung.com> | 2017-06-05 12:00:13 -0700 |
---|---|---|
committer | Cedric BAIL <cedric@osg.samsung.com> | 2017-06-05 12:07:57 -0700 |
commit | 3fadc0d5affd866d66b25b1a67c15a9a9db9474a (patch) | |
tree | 765dc9d2594442f64525a58221dab6f26fe01e99 | |
parent | 7caa81ed9d0eff5289936a51a825af3d1e2e86a5 (diff) | |
download | efl-3fadc0d5affd866d66b25b1a67c15a9a9db9474a.tar.gz |
draw: silence warning in a tricky loop/switch statement.
-rw-r--r-- | src/static_libs/draw/draw.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/static_libs/draw/draw.h b/src/static_libs/draw/draw.h index f25f66d97c..e4f64340f4 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) if (length <= 0) return; + // Cute hack to align future memcopy operation + // and do unroll the loop a bit. Not sure it is + // the most efficient, but will do for now. n = (length + 7) / 8; switch (length & 0x07) { case 0: do { *dest++ = value; + EINA_FALLTHROUGH; case 7: *dest++ = value; + EINA_FALLTHROUGH; case 6: *dest++ = value; + EINA_FALLTHROUGH; case 5: *dest++ = value; + EINA_FALLTHROUGH; case 4: *dest++ = value; + EINA_FALLTHROUGH; case 3: *dest++ = value; + EINA_FALLTHROUGH; case 2: *dest++ = value; + EINA_FALLTHROUGH; case 1: *dest++ = value; } while (--n > 0); } |