summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Dachary <loic-test4@dachary.org>2017-04-10 08:33:19 +0000
committerLoic Dachary <loic-test4@dachary.org>2017-04-10 08:33:19 +0000
commitf8e5f981859f87cbb0ca82e03f66c06571078093 (patch)
tree1608906b547e144c00b4e692736335752fed91bd
parent4add4fc4d84eaa0ff779ac92e5270c08c278b2d9 (diff)
parent39612c75510327dcb6ebeef1b4e3868ff5808fab (diff)
downloadjerasure-v2.tar.gz
Merge branch 'wip-signed-integer-overflow-cppcheck-v2' into 'v2'v2
Resolve cppcheck Signed integer overflow error See merge request !9
-rw-r--r--src/reed_sol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/reed_sol.c b/src/reed_sol.c
index 82edacb..72cbff8 100644
--- a/src/reed_sol.c
+++ b/src/reed_sol.c
@@ -136,7 +136,7 @@ static gf_t GF32;
void reed_sol_galois_w32_region_multby_2(char *region, int nbytes)
{
if (prim32 == -1) {
- prim32 = galois_single_multiply((1 << 31), 2, 32);
+ prim32 = galois_single_multiply(((gf_val_32_t)1 << 31), 2, 32);
if (!gf_init_hard(&GF32, 32, GF_MULT_BYTWO_b, GF_REGION_DEFAULT, GF_DIVIDE_DEFAULT,
prim32, 0, 0, NULL, NULL)) {
fprintf(stderr, "Error: Can't initialize the GF for reed_sol_galois_w32_region_multby_2\n");