diff --git a/c_src/cauchycoding.cpp b/c_src/cauchycoding.cpp index 7d627ed..c17bda6 100644 --- a/c_src/cauchycoding.cpp +++ b/c_src/cauchycoding.cpp @@ -97,7 +97,7 @@ ERL_NIF_TERM CauchyCoding::doDecode(vector blockList, vector throw std::invalid_argument("Blocks should be unique"); } - size_t blockSize; + size_t blockSize = 0; ErlNifBinary blocks[k + m]; for(size_t i = 0; i < blockIdList.size(); ++i) { @@ -165,7 +165,7 @@ vector CauchyCoding::doRepair(vector blockList, vect throw std::invalid_argument("Blocks should be unique"); } - size_t blockSize; + size_t blockSize = 0; ErlNifBinary blocks[k + m]; for(size_t i = 0; i < blockIdList.size(); ++i) { diff --git a/c_src/irscoding.cpp b/c_src/irscoding.cpp index 24891a3..3e55794 100644 --- a/c_src/irscoding.cpp +++ b/c_src/irscoding.cpp @@ -91,7 +91,7 @@ ERL_NIF_TERM IRSCoding::doDecode(vector blockList, vector blo throw std::invalid_argument("Blocks should be unique"); } - size_t blockSize; + size_t blockSize = 0; unsigned char* availBlocks[k + m]; ErlNifBinary blocks[k + m]; @@ -147,7 +147,7 @@ vector IRSCoding::doRepair(vector blockList, vector< throw std::invalid_argument("Blocks should be unique"); } - size_t blockSize; + size_t blockSize = 0; unsigned char* availBlocks[k + m]; ErlNifBinary blocks[k + m]; diff --git a/c_src/liberationcoding.cpp b/c_src/liberationcoding.cpp index 023f5c4..4664807 100644 --- a/c_src/liberationcoding.cpp +++ b/c_src/liberationcoding.cpp @@ -95,7 +95,7 @@ ERL_NIF_TERM LiberationCoding::doDecode(vector blockList, vector LiberationCoding::doRepair(vector blockList, throw std::invalid_argument("Blocks should be unique"); } - size_t blockSize; + size_t blockSize = 0; ErlNifBinary blocks[k + m]; for(size_t i = 0; i < blockIdList.size(); ++i) {