Fix some compiler warnings

This commit is contained in:
Micke Prag 2012-10-30 15:58:34 +01:00
parent 4d1fdd777f
commit 9d5af14609
6 changed files with 13 additions and 7 deletions

View file

@ -60,7 +60,7 @@ void Message::addSpecialArgument(const std::wstring &value){
this->append(L":"); this->append(L":");
this->append(value); this->append(value);
/*
std::wstringstream st; std::wstringstream st;
st << (int)value.size(); st << (int)value.size();
this->append(st.str()); this->append(st.str());
@ -74,7 +74,6 @@ void Message::addSpecialArgument(int value){
int i = 0; int i = 0;
while(i<1000000){ while(i<1000000){
i++; i++;
/*
//std::wstringstream st; //std::wstringstream st;
//st << (int)value; //st << (int)value;
this->append(L"i"); this->append(L"i");

View file

@ -17,7 +17,8 @@ std::string ProtocolFineoffset::decodeData(const ControllerMessage &dataMsg) {
return ""; return "";
} }
uint8_t checksum = (uint8_t)TelldusCore::hexTo64l(data.substr(data.length()-2)); // Checksum currently not used
// uint8_t checksum = (uint8_t)TelldusCore::hexTo64l(data.substr(data.length()-2));
data = data.substr(0, data.length()-2); data = data.substr(0, data.length()-2);
uint8_t humidity = (uint8_t)TelldusCore::hexTo64l(data.substr(data.length()-2)); uint8_t humidity = (uint8_t)TelldusCore::hexTo64l(data.substr(data.length()-2));

View file

@ -15,7 +15,8 @@ std::string ProtocolMandolyn::decodeData(const ControllerMessage &dataMsg) {
std::string data = dataMsg.getParameter("data"); std::string data = dataMsg.getParameter("data");
uint32_t value = (uint32_t)TelldusCore::hexTo64l(data); uint32_t value = (uint32_t)TelldusCore::hexTo64l(data);
bool parity = value & 0x1; // parity not used
// bool parity = value & 0x1;
value >>= 1; value >>= 1;
double temp = static_cast<double>(value & 0x7FFF) - static_cast<double>(6400); double temp = static_cast<double>(value & 0x7FFF) - static_cast<double>(6400);
@ -25,7 +26,8 @@ std::string ProtocolMandolyn::decodeData(const ControllerMessage &dataMsg) {
uint8_t humidity = (value & 0x7F); uint8_t humidity = (value & 0x7F);
value >>= 7; value >>= 7;
bool battOk = value & 0x1; // battOk not used
// bool battOk = value & 0x1;
value >>= 3; value >>= 3;
uint8_t channel = (value & 0x3)+1; uint8_t channel = (value & 0x3)+1;

View file

@ -72,7 +72,8 @@ std::string ProtocolOregon::decodeEA4C(const std::string &data) {
std::string ProtocolOregon::decode1A2D(const std::string &data) { std::string ProtocolOregon::decode1A2D(const std::string &data) {
uint64_t value = TelldusCore::hexTo64l(data); uint64_t value = TelldusCore::hexTo64l(data);
uint8_t checksum2 = value & 0xFF; // checksum2 not used yet
// uint8_t checksum2 = value & 0xFF;
value >>= 8; value >>= 8;
uint8_t checksum1 = value & 0xFF; uint8_t checksum1 = value & 0xFF;
value >>= 8; value >>= 8;
@ -100,7 +101,8 @@ std::string ProtocolOregon::decode1A2D(const std::string &data) {
value >>= 8; value >>= 8;
checksum += ((value >> 4) & 0xF) + (value & 0xF); checksum += ((value >> 4) & 0xF) + (value & 0xF);
uint8_t channel = (value >> 4) & 0x7; // channel not used
// uint8_t channel = (value >> 4) & 0x7;
checksum += 0x1 + 0xA + 0x2 + 0xD - 0xA; checksum += 0x1 + 0xA + 0x2 + 0xD - 0xA;

View file

@ -115,6 +115,7 @@ std::string Settings::getNodeString(Settings::Node type) const {
} else if (type == Controller) { } else if (type == Controller) {
return "controller"; return "controller";
} }
return "";
} }
#ifndef _CONFUSE #ifndef _CONFUSE

View file

@ -267,6 +267,7 @@ int list_kv_devices() {
printf("\n"); printf("\n");
index++; index++;
} }
return TELLSTICK_SUCCESS;
} }