diff --git a/dbcon/mysql/ha_calpont_impl.cpp b/dbcon/mysql/ha_calpont_impl.cpp index c66cf944c..80a12ca63 100755 --- a/dbcon/mysql/ha_calpont_impl.cpp +++ b/dbcon/mysql/ha_calpont_impl.cpp @@ -3461,9 +3461,9 @@ void ha_calpont_impl_start_bulk_insert(ha_rows rows, TABLE* table) { v2[i++] = arg; } - for (i = 0; i < v2.size(); ++i) + for (unsigned int j = 0; j < i; ++j) { - Cmds.push_back(const_cast(v2[i].c_str())); + Cmds.push_back(const_cast(v2[j].c_str())); } Cmds.push_back(0); //null terminate diff --git a/writeengine/server/we_dataloader.cpp b/writeengine/server/we_dataloader.cpp index 79e7aef84..f30437cd3 100644 --- a/writeengine/server/we_dataloader.cpp +++ b/writeengine/server/we_dataloader.cpp @@ -253,10 +253,10 @@ bool WEDataLoader::setupCpimport() // fork the cpimport { v2[i++] = arg; } - for (i = 0; i < v2.size(); ++i) + for (unsigned int j = 0; j < i; ++j) { - Cmds.push_back(const_cast(v2[i].c_str())); - } + Cmds.push_back(const_cast(v2[j].c_str())); + } Cmds.push_back(0); //null terminate //updatePrgmPath(Cmds); diff --git a/writeengine/splitter/we_splitterapp.cpp b/writeengine/splitter/we_splitterapp.cpp index afaeb4edb..7ecbca854 100644 --- a/writeengine/splitter/we_splitterapp.cpp +++ b/writeengine/splitter/we_splitterapp.cpp @@ -459,10 +459,9 @@ void WESplitterApp::invokeCpimport() //we need something that works on Windows as well as linux v2[i++] = arg; } - for (i = 0; i < v2.size(); ++i) + for (unsigned int j = 0; j < i; ++j) { - //we're going to exec() below, so don't worry about freeing - Cmds.push_back(const_cast(v2[i].c_str())); + Cmds.push_back(const_cast(v2[j].c_str())); } Cmds.push_back(0); //null terminate