Merge Request #19

Merged
jerasure/gf-complete!19
Created by Kefu Chai

Gf32 mul silence warning

silence warning like

/slow/kchai/ceph/src/erasure-code/jerasure/gf-complete/src/gf_w32.c: In function ‘gf_w32_cfmgk_multiply_region_from_single’:
/slow/kchai/ceph/src/erasure-code/jerasure/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);
     ^
Assignee: Loic Dachary
Milestone: None

Merged by Loic Dachary

Commits (1)
  • 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>
    Kefu Chai
     
2 participants