mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-01 14:35:29 +00:00
[master] addressed cpp-check issues detected on Jenkins.
This commit is contained in:
@@ -150,7 +150,6 @@ CqlConnection::openDatabase() {
|
|||||||
void
|
void
|
||||||
CqlConnection::prepareStatements(CqlTaggedStatement *statements) {
|
CqlConnection::prepareStatements(CqlTaggedStatement *statements) {
|
||||||
CassError rc = CASS_OK;
|
CassError rc = CASS_OK;
|
||||||
CassFuture* future = NULL;
|
|
||||||
uint32_t size = 0;
|
uint32_t size = 0;
|
||||||
tagged_statements_ = statements;
|
tagged_statements_ = statements;
|
||||||
for (; tagged_statements_[size].params_; size++);
|
for (; tagged_statements_[size].params_; size++);
|
||||||
@@ -158,7 +157,7 @@ CqlConnection::prepareStatements(CqlTaggedStatement *statements) {
|
|||||||
for (uint32_t i = 0; i < size; i++) {
|
for (uint32_t i = 0; i < size; i++) {
|
||||||
const char* query = tagged_statements_[i].text_;
|
const char* query = tagged_statements_[i].text_;
|
||||||
|
|
||||||
future = cass_session_prepare(session_, query);
|
CassFuture* future = cass_session_prepare(session_, query);
|
||||||
cass_future_wait(future);
|
cass_future_wait(future);
|
||||||
std::string error;
|
std::string error;
|
||||||
checkStatementError(error, future, i, "could not prepare statement");
|
checkStatementError(error, future, i, "could not prepare statement");
|
||||||
|
@@ -1185,7 +1185,6 @@ CqlLeaseMgr::bindData(CassStatement* statement, const StatementIndex stindex,
|
|||||||
void
|
void
|
||||||
CqlLeaseMgr::getData(const CassRow* row, const int pindex, CqlDataArray& data,
|
CqlLeaseMgr::getData(const CassRow* row, const int pindex, CqlDataArray& data,
|
||||||
CqlDataArray& size, const int dindex, const SqlExchange& exchange) {
|
CqlDataArray& size, const int dindex, const SqlExchange& exchange) {
|
||||||
const CassValue* value;
|
|
||||||
if (pindex >= exchange.parameters_.size()) {
|
if (pindex >= exchange.parameters_.size()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1194,7 +1193,7 @@ CqlLeaseMgr::getData(const CassRow* row, const int pindex, CqlDataArray& data,
|
|||||||
if (std::distance(range.first, range.second) > 0) {
|
if (std::distance(range.first, range.second) > 0) {
|
||||||
std::string name = (*range.first)->name_;
|
std::string name = (*range.first)->name_;
|
||||||
ExchangeDataType type = (*range.first)->type_;
|
ExchangeDataType type = (*range.first)->type_;
|
||||||
value = cass_row_get_column_by_name(row, name.c_str());
|
const CassValue* value = cass_row_get_column_by_name(row, name.c_str());
|
||||||
if (NULL == value) {
|
if (NULL == value) {
|
||||||
isc_throw(BadValue, "column name " << name << " doesn't exist");
|
isc_throw(BadValue, "column name " << name << " doesn't exist");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user