diff --git a/telldus-core/client/CallbackDispatcher.cpp b/telldus-core/client/CallbackDispatcher.cpp index 9b427421..91ba088b 100644 --- a/telldus-core/client/CallbackDispatcher.cpp +++ b/telldus-core/client/CallbackDispatcher.cpp @@ -65,6 +65,5 @@ void TDEventDispatcher::fireEvent() { return; } ((TDControllerEvent)callback->event)(data->controllerId, data->changeEvent, data->changeType, data->newValue.c_str(), callback->id, callback->context); - } } diff --git a/telldus-core/client/Client.cpp b/telldus-core/client/Client.cpp index 7237445e..c0e394a1 100644 --- a/telldus-core/client/Client.cpp +++ b/telldus-core/client/Client.cpp @@ -23,7 +23,6 @@ public: std::wstring sensorCache, controllerCache; TelldusCore::Mutex mutex; CallbackMainDispatcher callbackMainDispatcher; - }; Client *Client::instance = 0; @@ -147,7 +146,6 @@ void Client::run() { } std::wstring Client::sendToService(const Message &msg) { - int tries = 0; std::wstring readData; while(tries < 20) { diff --git a/telldus-core/common/Message.cpp b/telldus-core/common/Message.cpp index 600cb460..7c05895c 100644 --- a/telldus-core/common/Message.cpp +++ b/telldus-core/common/Message.cpp @@ -109,7 +109,6 @@ bool Message::nextIsString(const std::wstring &message) { } std::wstring Message::takeString(std::wstring *message) { - if (!Message::nextIsString(*message)) { return L""; } diff --git a/telldus-core/common/Message.h b/telldus-core/common/Message.h index e1ffc656..b79cacf2 100644 --- a/telldus-core/common/Message.h +++ b/telldus-core/common/Message.h @@ -30,7 +30,6 @@ namespace TelldusCore { static int takeInt(std::wstring *); private: - }; } diff --git a/telldus-core/service/ClientCommunicationHandler.cpp b/telldus-core/service/ClientCommunicationHandler.cpp index 5b091343..7291590e 100644 --- a/telldus-core/service/ClientCommunicationHandler.cpp +++ b/telldus-core/service/ClientCommunicationHandler.cpp @@ -111,7 +111,7 @@ void ClientCommunicationHandler::parseMessage(const std::wstring &clientMessage, int deviceId = TelldusCore::Message::takeInt(&msg); (*intReturn) = d->deviceManager->doAction(deviceId, TELLSTICK_STOP, 0); - } else if (function == L"tdLearn") { + } else if (function == L"tdLearn") { int deviceId = TelldusCore::Message::takeInt(&msg); (*intReturn) = d->deviceManager->doAction(deviceId, TELLSTICK_LEARN, 0); @@ -252,7 +252,7 @@ void ClientCommunicationHandler::parseMessage(const std::wstring &clientMessage, int controllerId = TelldusCore::Message::takeInt(&msg); (*intReturn) = d->controllerManager->removeController(controllerId); - } else{ + } else { (*intReturn) = TELLSTICK_ERROR_UNKNOWN; } } diff --git a/telldus-core/service/ConnectionListener_unix.cpp b/telldus-core/service/ConnectionListener_unix.cpp index 32b991a9..78d3911a 100644 --- a/telldus-core/service/ConnectionListener_unix.cpp +++ b/telldus-core/service/ConnectionListener_unix.cpp @@ -87,7 +87,6 @@ void ConnectionListener::run() { ConnectionListenerEventData *data = new ConnectionListenerEventData(); data->socket = new TelldusCore::Socket(clientSocket); d->waitEvent->signal(data); - } close(serverSocket); } diff --git a/telldus-core/service/Controller.cpp b/telldus-core/service/Controller.cpp index ad23935d..2cca4c03 100644 --- a/telldus-core/service/Controller.cpp +++ b/telldus-core/service/Controller.cpp @@ -37,7 +37,6 @@ void Controller::publishData(const std::string &msg) const { } void Controller::decodePublishData(const std::string &data) const { - std::list msgList = Protocol::decodeData(data); for (std::list::iterator msgIt = msgList.begin(); msgIt != msgList.end(); ++msgIt) { diff --git a/telldus-core/service/ControllerManager.cpp b/telldus-core/service/ControllerManager.cpp index a8ac4ecd..977ff598 100644 --- a/telldus-core/service/ControllerManager.cpp +++ b/telldus-core/service/ControllerManager.cpp @@ -127,7 +127,6 @@ Controller *ControllerManager::getBestControllerById(int id) { } } return 0; - } void ControllerManager::loadControllers() { diff --git a/telldus-core/service/Device.cpp b/telldus-core/service/Device.cpp index 7bbbbc6b..41399643 100644 --- a/telldus-core/service/Device.cpp +++ b/telldus-core/service/Device.cpp @@ -50,7 +50,6 @@ int Device::getLastSentCommand(int methodsSupported) { lastSentCommand = TELLSTICK_TURNOFF; } return lastSentCommand; - } int Device::getMethods() const { diff --git a/telldus-core/service/DeviceManager.cpp b/telldus-core/service/DeviceManager.cpp index e322c811..84fe73c2 100644 --- a/telldus-core/service/DeviceManager.cpp +++ b/telldus-core/service/DeviceManager.cpp @@ -144,7 +144,6 @@ int DeviceManager::getDeviceMethods(int deviceId, std::set &duplicateDevice } DeviceMap::iterator it = d->devices.find(deviceId); if (it != d->devices.end()) { - { TelldusCore::MutexLocker deviceLocker(it->second); type = it->second->getType(); @@ -522,7 +521,6 @@ int DeviceManager::doGroupAction(const std::wstring devices, const int action, c // If no devices support the method the default value will be returned (method not supported) retval = deviceReturnValue; } - } return retval; } diff --git a/telldus-core/service/Protocol.cpp b/telldus-core/service/Protocol.cpp index 8c4f8ca0..04420885 100644 --- a/telldus-core/service/Protocol.cpp +++ b/telldus-core/service/Protocol.cpp @@ -207,7 +207,7 @@ std::list Protocol::getParametersForProtocol(const std::wstring &pr } else if (TelldusCore::comparei(protocolName, L"group")) { parameters.push_back("devices"); - } else if (TelldusCore::comparei(protocolName, L"scene")) { + } else if (TelldusCore::comparei(protocolName, L"scene")) { parameters.push_back("devices"); } diff --git a/telldus-core/service/ProtocolFuhaote.cpp b/telldus-core/service/ProtocolFuhaote.cpp index b80b0b83..7254520e 100644 --- a/telldus-core/service/ProtocolFuhaote.cpp +++ b/telldus-core/service/ProtocolFuhaote.cpp @@ -56,6 +56,5 @@ std::string ProtocolFuhaote::getStringForMethod(int method, unsigned char, Contr strReturn.append(1, S); strReturn.append("+"); return strReturn; - } diff --git a/telldus-core/service/ProtocolGroup.h b/telldus-core/service/ProtocolGroup.h index aa82edc7..509c2a3a 100644 --- a/telldus-core/service/ProtocolGroup.h +++ b/telldus-core/service/ProtocolGroup.h @@ -14,7 +14,6 @@ class ProtocolGroup : public Protocol { public: virtual int methods() const; virtual std::string getStringForMethod(int method, unsigned char data, Controller *controller); - }; #endif // TELLDUS_CORE_SERVICE_PROTOCOLGROUP_H_ diff --git a/telldus-core/service/ProtocolIkea.cpp b/telldus-core/service/ProtocolIkea.cpp index 1d8d7c45..6b246562 100644 --- a/telldus-core/service/ProtocolIkea.cpp +++ b/telldus-core/service/ProtocolIkea.cpp @@ -129,5 +129,4 @@ std::string ProtocolIkea::getStringForMethod(int method, unsigned char level, Co strReturn.append("+"); return strReturn; - } diff --git a/telldus-core/service/ProtocolRisingSun.cpp b/telldus-core/service/ProtocolRisingSun.cpp index a48d59b3..c4e9ae0c 100644 --- a/telldus-core/service/ProtocolRisingSun.cpp +++ b/telldus-core/service/ProtocolRisingSun.cpp @@ -100,11 +100,9 @@ std::string ProtocolRisingSun::getStringCodeSwitch(int method) { return ""; } return strReturn; - } std::string ProtocolRisingSun::getCodeSwitchTuple(int intToConvert) { - std::string strReturn = ""; for(int i = 0; i < 4; ++i) { if (i == intToConvert) { @@ -114,5 +112,4 @@ std::string ProtocolRisingSun::getCodeSwitchTuple(int intToConvert) { } } return strReturn; - } diff --git a/telldus-core/service/ProtocolSartano.cpp b/telldus-core/service/ProtocolSartano.cpp index 6fa9c7e6..255aaca7 100644 --- a/telldus-core/service/ProtocolSartano.cpp +++ b/telldus-core/service/ProtocolSartano.cpp @@ -19,7 +19,6 @@ std::string ProtocolSartano::getStringForMethod(int method, unsigned char, Contr } std::string ProtocolSartano::getStringForCode(const std::wstring &strCode, int method) { - std::string strReturn("S"); for (size_t i = 0; i < strCode.length(); ++i) { @@ -39,7 +38,6 @@ std::string ProtocolSartano::getStringForCode(const std::wstring &strCode, int m } return strReturn; - } std::string ProtocolSartano::decodeData(ControllerMessage &dataMsg) { diff --git a/telldus-core/service/ProtocolScene.h b/telldus-core/service/ProtocolScene.h index 87ca70f7..87f80afe 100644 --- a/telldus-core/service/ProtocolScene.h +++ b/telldus-core/service/ProtocolScene.h @@ -14,7 +14,6 @@ class ProtocolScene : public Protocol { public: virtual int methods() const; virtual std::string getStringForMethod(int method, unsigned char data, Controller *controller); - }; #endif // TELLDUS_CORE_SERVICE_PROTOCOLSCENE_H_ diff --git a/telldus-core/service/ProtocolSilvanChip.cpp b/telldus-core/service/ProtocolSilvanChip.cpp index 7c57f539..ddc20068 100644 --- a/telldus-core/service/ProtocolSilvanChip.cpp +++ b/telldus-core/service/ProtocolSilvanChip.cpp @@ -122,7 +122,6 @@ std::string ProtocolSilvanChip::getStringForMethod(int method, unsigned char dat } std::string ProtocolSilvanChip::getString(const std::string &preamble, const std::string &one, const std::string &zero, int button) { - int intHouse = this->getIntParameter(L"house", 1, 1048575); std::string strReturn = preamble; diff --git a/telldus-core/service/ProtocolX10.cpp b/telldus-core/service/ProtocolX10.cpp index ba9f11e1..88b2308c 100644 --- a/telldus-core/service/ProtocolX10.cpp +++ b/telldus-core/service/ProtocolX10.cpp @@ -111,7 +111,6 @@ std::string ProtocolX10::getStringForMethod(int method, unsigned char data, Cont strReturn.append( reinterpret_cast(STOP_CODE) ); strReturn.append("+"); return strReturn; - } std::string ProtocolX10::decodeData(ControllerMessage& dataMsg) { diff --git a/telldus-core/service/SettingsConfuse.cpp b/telldus-core/service/SettingsConfuse.cpp index 95042105..89af7d09 100644 --- a/telldus-core/service/SettingsConfuse.cpp +++ b/telldus-core/service/SettingsConfuse.cpp @@ -156,7 +156,6 @@ int Settings::removeNode(Node type, int intNodeId) { // Print all opts for(int i = 0; d->cfg->opts[i].name; i++) { - // Check if it isn't a device section if (strcmp(d->cfg->opts[i].name, strType.c_str()) != 0) { cfg_opt_print(&d->cfg->opts[i], fp); @@ -416,7 +415,6 @@ bool readConfig(cfg_t **cfg) { } bool readVarConfig(cfg_t **cfg) { - cfg_opt_t device_opts[] = { CFG_INT(const_cast("state"), 0, CFGF_NONE), CFG_STR(const_cast("stateValue"), const_cast(""), CFGF_NONE), diff --git a/telldus-core/service/TellStick_libftdi.cpp b/telldus-core/service/TellStick_libftdi.cpp index d31cdb0e..e22fcc83 100644 --- a/telldus-core/service/TellStick_libftdi.cpp +++ b/telldus-core/service/TellStick_libftdi.cpp @@ -65,7 +65,6 @@ TellStick::TellStick(int controllerId, TelldusCore::EventRef event, TelldusCore: ftdi_set_latency_timer(&d->ftHandle, 16); if (d->open) { - if (td.pid == 0x0C31) { this->setBaud(9600); } else { @@ -258,7 +257,6 @@ std::list TellStick::findAll() { } return tellstick; - } bool TellStick::stillConnected() const {