From c6a597c3ecaff8986645735639f42739bccbff03 Mon Sep 17 00:00:00 2001 From: Erik Frojdh Date: Fri, 11 Jan 2019 11:07:50 +0100 Subject: [PATCH] minor changes and removed W flag not found --- CMakeLists.txt | 2 +- slsDetectorSoftware/slsDetector/slsDetector.cpp | 7 ++++--- slsReceiverSoftware/include/GeneralData.h | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e6a6702b..255e2756f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ option (USE_GUI "GUI" OFF) option (USE_TESTS "TESTS" ON) if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 -Wno-misleading-indentation") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11") else () set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 ") endif () diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index ef2990066..136c72142 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -7,6 +7,7 @@ #include "versionAPI.h" #include "slsDetectorCommand.h" #include "utilities.h" +#include "string_utils.h" #include "MySocketTCP.h" @@ -1770,7 +1771,7 @@ std::string slsDetector::getSettingsDir() { std::string slsDetector::setSettingsDir(std::string s) { - sprintf(thisDetector->settingsDir, s.c_str()); + sls::strcpy_safe(thisDetector->settingsDir, s.c_str()); return thisDetector->settingsDir; } @@ -3244,8 +3245,8 @@ std::string slsDetector::setDetectorNetworkParameter(networkParameter index, int int slsDetector::setUDPConnection() { int fnum = F_SETUP_RECEIVER_UDP; int ret = FAIL; - char args[3][MAX_STR_LENGTH] = {0}; - char retvals[MAX_STR_LENGTH] = {0}; + char args[3][MAX_STR_LENGTH] = {{""}, {""}, {""}};; + char retvals[MAX_STR_LENGTH] = {""}; FILE_LOG(logDEBUG1) << "Setting UDP Connection"; // called before set up diff --git a/slsReceiverSoftware/include/GeneralData.h b/slsReceiverSoftware/include/GeneralData.h index 2f8f10dcb..dd9b4343c 100644 --- a/slsReceiverSoftware/include/GeneralData.h +++ b/slsReceiverSoftware/include/GeneralData.h @@ -480,8 +480,8 @@ private: /** * Print all variables */ - void Print() const { - GeneralData::Print(); + void Print(TLogLevel level = logDEBUG1) const { + GeneralData::Print(level); FILE_LOG(logINFO) << "Bytes Per Adc: " << bytesPerAdc; } };