Commit 7972291e1f1fb68d05332cccd46a738b0d83b1be

Authored by Danny Al-Gaaf
1 parent da671b49
Exists in master and in 1 other branch v3

src/gf_w128.c: remove dead code and unused variable

Fix for Coverity issue:

CID 1297812 (#1 of 1): Constant variable guards dead code (DEADCODE)
 dead_error_begin: Execution cannot reach this statement: fprintf(stderr,
  "Code conta....
 Local variable no_default_flag is assigned only once, to a constant
  value, making it effectively constant throughout its scope. If this
  is not the intent, examine the logic to see if there is a missing
  assignment that would make no_default_flag not remain constant.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Showing 1 changed file with 0 additions and 5 deletions   Show diff stats
src/gf_w128.c
... ... @@ -1724,7 +1724,6 @@ int gf_w128_scratch_size(int mult_type, int region_type, int divide_type, int ar
1724 1724 int gf_w128_init(gf_t *gf)
1725 1725 {
1726 1726 gf_internal_t *h;
1727   - int no_default_flag = 0;
1728 1727  
1729 1728 h = (gf_internal_t *) gf->scratch;
1730 1729  
... ... @@ -1737,10 +1736,6 @@ int gf_w128_init(gf_t *gf)
1737 1736 } else {
1738 1737 h->prim_poly = 0x87; /* Omitting the leftmost 1 as in w=32 */
1739 1738 }
1740   - if (no_default_flag == 1) {
1741   - fprintf(stderr,"Code contains no default irreducible polynomial for given base field\n");
1742   - return 0;
1743   - }
1744 1739 }
1745 1740  
1746 1741 gf->multiply.w128 = NULL;
... ...