Commit 1a79c40c authored by Alessio Netti's avatar Alessio Netti
Browse files

Tiny fixes

- Small fixes to prevent compilation warnings
parent b07598c8
......@@ -15,7 +15,7 @@ include $(DCDBCOREPATH)/common.mk
VERSION = $(shell git describe --long|sed 's/-\([0-9]*\)/.\1/')
CXXFLAGS = -std=c++11 -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG -DBOOST_NETWORK_ENABLE_HTTPS -O2 -g -Wall -Wno-unused-function -Wno-unused-local-typedef -Wno-deprecated-declarations -Wno-unused-variable -DBOOST_LOG_DYN_LINK -I$(DCDBBASEPATH)/dcdb/include -I$(DCDBDEPLOYPATH)/include -I$(DCDBDEPSPATH)/cpp-netlib-0.12.0-final/deps/asio/asio/include -DVERSION=\"$(VERSION)\"
CXXFLAGS = -std=c++11 -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG -DBOOST_NETWORK_ENABLE_HTTPS -O2 -g -Wall -Wno-unused-function -Wno-unused-local-typedefs -Wno-deprecated-declarations -Wno-unused-variable -DBOOST_LOG_DYN_LINK -I$(DCDBBASEPATH)/dcdb/include -I$(DCDBDEPLOYPATH)/include -I$(DCDBDEPSPATH)/cpp-netlib-0.12.0-final/deps/asio/asio/include -DVERSION=\"$(VERSION)\"
LIBS = -L../deps/mosquitto_build/lib -L$(DCDBDEPLOYPATH)/lib/ -ldl -lmosquitto -lboost_system -lboost_thread -lboost_log_setup -lboost_log -lboost_regex -lpthread -lcrypto -lssl -lcppnetlib-server-parsers -lcppnetlib-uri -rdynamic
OBJS = src/dcdbpusher.o src/Configuration.o src/MQTTPusher.o src/HttpsServer.o src/analytics/AnalyticsManager.o src/analytics/SensorNavigator.o
......@@ -85,6 +85,8 @@ install: $(TARGET) install_lib install_analyzer
src/Sensor.o: CXXFLAGS+= $(PLUGINFLAGS)
src/SensorGroup.o: CXXFLAGS+= $(PLUGINFLAGS)
src/sensors/%.o: CXXFLAGS+= $(PLUGINFLAGS) -I$(DCDBDEPSPATH)/bacnet-stack-$(BACNET-STACK_VERSION)/include -I$(DCDBDEPSPATH)/bacnet-stack-$(BACNET-STACK_VERSION)/ports/$(BACNET_PORT)
src/analytics/analyzers/%.o: CXXFLAGS+= $(PLUGINFLAGS)
src/analytics/SensorNavigator.o: CXXFLAGS+= $(PLUGINFLAGS)
#src/sensors/*/%.o: %.cpp
libdcdbplugin_sysfs.$(LIBEXT): src/sensors/sysfs/SysfsSensorGroup.o src/sensors/sysfs/SysfsConfigurator.o
......
......@@ -128,7 +128,7 @@ public:
*
* @return True if the tree is complete, False otherwise
*/
bool isTreeComplete() { return _hierarchy && _treeDepth == _hierarchy->size() - 1; }
bool isTreeComplete() { return _hierarchy && _treeDepth == (int)_hierarchy->size() - 1; }
/**
* @return The total depth of the internal sensor tree
......
......@@ -44,16 +44,14 @@ public:
_readingQueue(nullptr),
_sinkFile(nullptr) {
_lastRawUValue.timestamp = 0;
_lastRawUValue.value = 0;
_lastRawUValue.timestamp = 0;
_lastRawUValue.value = 0;
_lastRawValue.timestamp = 0;
_lastRawValue.value = 0;
_latestValue.timestamp = 0;
_latestValue.value = 0;
_latestValue.timestamp = 0;
_latestValue.value = 0;
_lastSentValue.timestamp= 0;
_lastSentValue.value = 0;
_lastRawValue.timestamp = 0;
_lastRawValue.value = 0;
_accumulator.timestamp = 0;
_accumulator.value = 0;
}
......@@ -70,8 +68,9 @@ public:
_cache(nullptr),
_delta(other._delta),
_firstReading(true),
_latestValue(other._latestValue),
_lastRawUValue(other._lastRawUValue),
_lastRawValue(other._lastRawValue),
_latestValue(other._latestValue),
_lastSentValue(other._lastSentValue),
_accumulator(other._accumulator),
_readingQueue(nullptr),
......@@ -97,8 +96,6 @@ public:
_lastRawValue.value = other._lastRawValue.value;
_latestValue.timestamp = other._latestValue.timestamp;
_latestValue.value = other._latestValue.value;
_lastRawValue.timestamp = other._lastRawValue.timestamp;
_lastRawValue.value = other._lastRawValue.value;
_lastSentValue.timestamp= other._lastSentValue.timestamp;
_lastSentValue.value = other._lastSentValue.value;
_accumulator.timestamp = other._accumulator.timestamp;
......
Supports Markdown
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