diff options
author | Jack Lloyd <[email protected]> | 2016-01-29 17:30:15 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-01-29 17:30:15 -0500 |
commit | e0997796f92c863f3b3b31464dc9530957e06d02 (patch) | |
tree | 823fd7b710c6c5b1a47fa0e54ee1d9e26465b105 /src/lib/pubkey/mce/gf2m_rootfind_dcmp.cpp | |
parent | 6526e3df0dfbe14faa8b0a12ffc890179ef77656 (diff) |
Avoid -Wmaybe-uninitialized warning under GCC 5.3
As best I can tell it wasn't actually possible for the value to be
used uninitialized, since it was initialized if m_outer_summands > 1
and only used if m_outer_summands was at least 2.
Diffstat (limited to 'src/lib/pubkey/mce/gf2m_rootfind_dcmp.cpp')
-rw-r--r-- | src/lib/pubkey/mce/gf2m_rootfind_dcmp.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/pubkey/mce/gf2m_rootfind_dcmp.cpp b/src/lib/pubkey/mce/gf2m_rootfind_dcmp.cpp index 3a377a447..008da99c1 100644 --- a/src/lib/pubkey/mce/gf2m_rootfind_dcmp.cpp +++ b/src/lib/pubkey/mce/gf2m_rootfind_dcmp.cpp @@ -238,10 +238,9 @@ gf2m gf2m_decomp_rootfind_state::calc_Fxj_j_neq_0( const polyn_gf2m & sigma, gf2 gf2m sum = 0; u32bit i; std::shared_ptr<GF2m_Field> sp_field = sigma.get_sp_field(); - gf2m xl_j_tt_5i, xl_j_tt_5, xl_gray_tt_3; const gf2m jl_gray = sp_field->gf_l_from_n(j_gray); - xl_j_tt_5 = sp_field->gf_square_rr(jl_gray); - xl_gray_tt_3 = sp_field->gf_mul_rrr(xl_j_tt_5, jl_gray); + gf2m xl_j_tt_5 = sp_field->gf_square_rr(jl_gray); + gf2m xl_gray_tt_3 = sp_field->gf_mul_rrr(xl_j_tt_5, jl_gray); xl_j_tt_5 = sp_field->gf_mul_rrr(xl_j_tt_5, xl_gray_tt_3); @@ -253,13 +252,16 @@ gf2m gf2m_decomp_rootfind_state::calc_Fxj_j_neq_0( const polyn_gf2m & sigma, gf2 /* treat i = 0 special: */ sum ^= this->m_Aij[0]; /* treat i = 1 special also */ + if(this->m_outer_summands > 1) { gf2m x; - xl_j_tt_5i = xl_j_tt_5; x = sp_field->gf_mul_zrz(xl_j_tt_5, this->m_Aij[1]); /* x_j^{5i} A_i^j */ sum ^= x; } + + gf2m xl_j_tt_5i = xl_j_tt_5; + for(i = 2; i < this->m_outer_summands; i++) { gf2m x; |