summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKefu Chai <tchaikov@gmail.com>2016-11-18 03:53:50 +0000
committerKefu Chai <tchaikov@gmail.com>2016-11-18 03:53:50 +0000
commit9fbc44259355b00d1271c21bf14493d039160ccf (patch)
treef0824a4c32d3ded320051c44a9dfd7a0c0f4006c
parenta6847973cba329ae079d3bd26341a4ec2906f012 (diff)
downloadgf-complete-9fbc44259355b00d1271c21bf14493d039160ccf.tar.gz
gf_w32.c: silence the -Wmaybe-uninitialized warning
in gf_w32_cfmgk_multiply_region_from_single(), follow warning is reported by gcc: gf-complete/src/gf_w32.c:410:5: warning: ‘a’ may be used uninitialized in this function [-Wmaybe-uninitialized] g = _mm_insert_epi64 (a, g_star, 0); ^ actually, we are using `a` as a dummy parameter for initializing `g` and `q`. and only the lower lower 64 bits of them are used when doing calculation. but their lower 64 bits are always initialized using _mm_insert_epi64(). so this is a false alarm. but we can silence this warning by moving the statement initializing `a` up before passing it to _mm_insert_epi64(). this change does not hurt the performance. Signed-off-by: Kefu Chai <kchai@redhat.com>
-rw-r--r--src/gf_w32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gf_w32.c b/src/gf_w32.c
index bb22894..92dba87 100644
--- a/src/gf_w32.c
+++ b/src/gf_w32.c
@@ -407,9 +407,9 @@ gf_w32_cfmgk_multiply_region_from_single(gf_t *gf, void *src, void *dest, uint32
q_plus = *(uint64_t *) h->private;
g_star = *((uint64_t *) h->private + 1);
+ a = _mm_insert_epi32 (_mm_setzero_si128(), val, 0);
g = _mm_insert_epi64 (a, g_star, 0);
q = _mm_insert_epi64 (a, q_plus, 0);
- a = _mm_insert_epi32 (_mm_setzero_si128(), val, 0);
s32 = (uint32_t *) src;
d32 = (uint32_t *) dest;