fixed compiler warnings

This commit is contained in:
john30
2017-04-09 16:46:22 +02:00
parent a19a38266a
commit 80e6f48cf1
3 changed files with 4 additions and 8 deletions
+1 -1
View File
@@ -127,7 +127,7 @@ void appendJson(ostringstream& output, const string name, const string value, bo
if (!plain) {
const char* str = value.c_str();
char* strEnd = NULL;
double dvalue = strtod(str, &strEnd);
strtod(str, &strEnd);
plain = strEnd && *strEnd;
}
}
+3 -4
View File
@@ -170,11 +170,11 @@ Message::Message(const string circuit, const string level, const string name,
: AttributedItem(name, attributes), m_circuit(circuit), m_level(level), m_isWrite(isWrite),
m_isPassive(isPassive),
m_srcAddress(srcAddress), m_dstAddress(dstAddress),
m_id(id), m_data(data), m_deleteData(deleteData),
m_id(id), m_key(createKey(id, isWrite, isPassive, srcAddress, dstAddress)),
m_data(data), m_deleteData(deleteData),
m_pollPriority(pollPriority),
m_usedByCondition(false), m_isScanMessage(false), m_condition(condition),
m_lastUpdateTime(0), m_lastChangeTime(0), m_pollCount(0), m_lastPollTime(0),
m_key(createKey(id, isWrite, isPassive, srcAddress, dstAddress)) {
m_lastUpdateTime(0), m_lastChangeTime(0), m_pollCount(0), m_lastPollTime(0) {
if (circuit == "scan") {
setScanMessage();
m_pollPriority = 0;
@@ -781,7 +781,6 @@ result_t Message::storeLastData(SlaveSymbolString& data, size_t index) {
if (data != m_lastSlaveData) {
m_lastChangeTime = m_lastUpdateTime;
m_lastSlaveData = data;
const SlaveSymbolString& chk = getLastSlaveData();
}
return RESULT_OK;
}
-3
View File
@@ -612,9 +612,6 @@ class Message : public AttributedItem {
* false if message can be initiated by any participant. */
const bool m_isPassive;
/** the additional named attributes. */
const map<string, string> m_attributes;
/** the source address, or @a SYN for any (only relevant if passive). */
const symbol_t m_srcAddress;