Skip to content

Commit

Permalink
Silence warning messages
Browse files Browse the repository at this point in the history
1. Change initialization order.
2. Comment out unused variables.
3. Comment out statements that have no effect.
4. Remove "&" from type conversion.
  • Loading branch information
Nathan Sparks committed Nov 16, 2016
1 parent ca0d437 commit f78f8d5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cpp/include/RCDB/MySqlConnectionInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ namespace rcdb
MySQLConnectionInfo()
:UserName(""),
Password(""),
HostName(""),
Database(""),
HostName(""),
Port(0)
{
}
Expand Down
8 changes: 4 additions & 4 deletions cpp/include/RCDB/MySqlProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ namespace rcdb {
static const int int_column = 3;
static const int text_column = 4;
static const int time_column = 5;
uint64_t typeId = cndType.GetId();
uint64_t run = runNumber;
//uint64_t typeId = cndType.GetId();
//uint64_t run = runNumber;

string query = string("SELECT id, bool_value, float_value, int_value, text_value, time_value FROM conditions WHERE run_number =") +
to_string(runNumber) +
Expand Down Expand Up @@ -231,8 +231,8 @@ namespace rcdb {
printf("\n");
}

(result);
(con);
//(result);
//(con);
}

static MySQLConnectionInfo ParseConnectionString(std::string conStr)
Expand Down
10 changes: 5 additions & 5 deletions cpp/include/RCDB/SqLiteProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ namespace rcdb {

_getConditionQuery.reset();
_getConditionQuery.clearBindings();
_getConditionQuery.bind(1, (sqlite3_int64&)run);
_getConditionQuery.bind(2, (sqlite3_int64&)typeId);
_getConditionQuery.bind(1, (sqlite3_int64)run);
_getConditionQuery.bind(2, (sqlite3_int64)typeId);


while (_getConditionQuery.executeStep()) {
Expand Down Expand Up @@ -127,7 +127,7 @@ namespace rcdb {
_getFileQuery.reset();
_getFileQuery.clearBindings();
_getFileQuery.bind(1, name.c_str());
_getFileQuery.bind(2, (sqlite3_int64&)runNumber);
_getFileQuery.bind(2, (sqlite3_int64)runNumber);


while (_getFileQuery.executeStep()) {
Expand Down Expand Up @@ -157,8 +157,8 @@ namespace rcdb {

_getConditionQuery.reset();
_getConditionQuery.clearBindings();
_getConditionQuery.bind(1, (sqlite3_int64&)run);
_getConditionQuery.bind(2, (sqlite3_int64&)typeId);
_getConditionQuery.bind(1, (sqlite3_int64)run);
_getConditionQuery.bind(2, (sqlite3_int64)typeId);


while (_getConditionQuery.executeStep()) {
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/RCDB/StringUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class StringUtils {
//clear output
tokens.clear();
bool stringIsStarted = false; //Indicates that we meet '"' and looking for second one
bool isSlash = false; //indicates if \ sign is happen to shield the quote or anothe slash
//bool isSlash = false; //indicates if \ sign is happen to shield the quote or anothe slash
std::string readValue="";
//iterate through string
for(size_t i=0; i<source.length(); i++)
Expand Down

0 comments on commit f78f8d5

Please sign in to comment.