Commit 38bfdf30 authored by Alessio Netti's avatar Alessio Netti

Minor warning fixes

- Fixing a few warnings here and there in the tools subdirectory
parent 787db53b
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
class UserAction class UserAction
{ {
public: public:
virtual ~UserAction() {}
virtual void printHelp(int argc, char* argv[]) = 0; virtual void printHelp(int argc, char* argv[]) = 0;
virtual int executeCommand(int argc, char* argv[], int argvidx, const char* hostname) = 0; virtual int executeCommand(int argc, char* argv[], int argvidx, const char* hostname) = 0;
}; };
......
...@@ -213,7 +213,7 @@ int main(int argc, char** argv) ...@@ -213,7 +213,7 @@ int main(int argc, char** argv)
for (it = sensors.begin(); it != sensors.end(); it++) { for (it = sensors.begin(); it != sensors.end(); it++) {
std::cout << it->name << " " << it->topic << " " << it->publicName << std::endl; std::cout << it->name << " " << it->topic << " " << it->publicName << std::endl;
sensorConfig.publishSensor(it->publicName.c_str(), it->topic.c_str()); sensorConfig.publishSensor(it->publicName.c_str(), it->topic.c_str());
} } */
/* Disconnect */ /* Disconnect */
delete connection; delete connection;
......
...@@ -95,6 +95,8 @@ void DCDBQuery::genOutput(std::list<DCDB::SensorDataStoreReading> &results, quer ...@@ -95,6 +95,8 @@ void DCDBQuery::genOutput(std::list<DCDB::SensorDataStoreReading> &results, quer
case DCDB_OP_INTEGRAL: case DCDB_OP_INTEGRAL:
std::cout << ",Integral"; std::cout << ",Integral";
break; break;
default:
break;
} }
if(it->second.unit != DCDB::Unit_None) { if(it->second.unit != DCDB::Unit_None) {
std::cout << " (" << DCDB::UnitConv::toString(it->second.unit) << ")"; std::cout << " (" << DCDB::UnitConv::toString(it->second.unit) << ")";
...@@ -161,6 +163,8 @@ void DCDBQuery::genOutput(std::list<DCDB::SensorDataStoreReading> &results, quer ...@@ -161,6 +163,8 @@ void DCDBQuery::genOutput(std::list<DCDB::SensorDataStoreReading> &results, quer
std::cout << ","; std::cout << ",";
} }
break;} break;}
default:
break;
} }
} else { } else {
std::cout << ","; std::cout << ",";
...@@ -192,8 +196,8 @@ void DCDBQuery::doQuery(const char* hostname, std::list<std::string> sensors, DC ...@@ -192,8 +196,8 @@ void DCDBQuery::doQuery(const char* hostname, std::list<std::string> sensors, DC
std::string sensorName; std::string sensorName;
std::string functName; std::string functName;
std::string modifierStr; std::string modifierStr;
double scalingFactor = 1.0; //double scalingFactor = 1.0;
DCDB::Unit unit = DCDB::Unit_None; //DCDB::Unit unit = DCDB::Unit_None;
/* Retrieve sensor object first */ /* Retrieve sensor object first */
std::string str = *it; std::string str = *it;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment