From d7c124a03d5b8c8d2515cc536c3419c9cf9f463f Mon Sep 17 00:00:00 2001 From: Steffen Pankratz Date: Sat, 20 Mar 2021 14:01:07 +0100 Subject: [PATCH 1/6] fix 'Compatibility with CMake < 2.8.12 will be removed' warning. Signed-off-by: Steffen Pankratz Original warning: CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake. Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9771bb88..829f12af 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR) +cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) file(STRINGS "VERSION" VERSION) From bd72da276ed273dc474f10973a042fbbb1a95c41 Mon Sep 17 00:00:00 2001 From: Steffen Pankratz Date: Sat, 20 Mar 2021 14:03:20 +0100 Subject: [PATCH 2/6] fix CMake CMP0075 warning Signed-off-by: Steffen Pankratz Original warning: CMake Warning (dev) at /usr/share/cmake-3.19/Modules/CheckIncludeFile.cmake:80 (message): Policy CMP0075 is not set: Include file check macros honor CMAKE_REQUIRED_LIBRARIES. Run "cmake --help-policy CMP0075" for policy details. Use the cmake_policy command to set the policy and suppress this warning. CMAKE_REQUIRED_LIBRARIES is set to: pthread;rt For compatibility with CMake 3.11 and below this check is ignoring it. Call Stack (most recent call first): CMakeLists.txt:56 (check_include_file) This warning is for project developers. Use -Wno-dev to suppress it. --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 829f12af..b076676e 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,11 @@ cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) +# CMP0075 Include file check macros honor CMAKE_REQUIRED_LIBRARIES +# For more information see: https://cmake.org/cmake/help/latest/policy/CMP0075.html +if(POLICY CMP0075) + cmake_policy(SET CMP0075 NEW) +endif() + file(STRINGS "VERSION" VERSION) project(ebusd) From 049e70bea8fc4a7a654de721cb4bf6be0bcb885c Mon Sep 17 00:00:00 2001 From: Steffen Pankratz Date: Sat, 20 Mar 2021 14:05:06 +0100 Subject: [PATCH 3/6] fix for CMake out of source builds not getting Git revision Signed-off-by: Steffen Pankratz Original warning: fatal: not a git repository (or any of the parent directories): .git --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b076676e..868e6668 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,8 @@ execute_process(COMMAND echo -n ${VERSION} execute_process(COMMAND git describe --always OUTPUT_VARIABLE REVISION - OUTPUT_STRIP_TRAILING_WHITESPACE) + OUTPUT_STRIP_TRAILING_WHITESPACE + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) if(NOT REVISION) execute_process(COMMAND date +p%Y%m%d OUTPUT_VARIABLE REVISION From 676c3307fd9a52def77e05c2404f224ee965d849 Mon Sep 17 00:00:00 2001 From: Steffen Pankratz Date: Sat, 20 Mar 2021 22:48:01 +0100 Subject: [PATCH 4/6] fix unused variable warnings. Signed-off-by: Steffen Pankratz --- src/lib/ebus/datatype.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib/ebus/datatype.cpp b/src/lib/ebus/datatype.cpp index f2d5b8fd..82bd9a8d 100755 --- a/src/lib/ebus/datatype.cpp +++ b/src/lib/ebus/datatype.cpp @@ -68,8 +68,7 @@ bool DataType::dump(OutputFormat outputFormat, size_t length, bool appendDivisor } -result_t StringDataType::readRawValue(size_t offset, size_t length, const SymbolString& input, - unsigned int* value) const { +result_t StringDataType::readRawValue(size_t, size_t, const SymbolString&, unsigned int*) const { return RESULT_EMPTY; } @@ -204,8 +203,7 @@ result_t StringDataType::writeSymbols(size_t offset, size_t length, istringstrea } -result_t DateTimeDataType::readRawValue(size_t offset, size_t length, const SymbolString& input, - unsigned int* value) const { +result_t DateTimeDataType::readRawValue(size_t, size_t, const SymbolString&, unsigned int*) const { return RESULT_EMPTY; } From 7c699be734bd67a68bf7813cb30795c05ebf45b3 Mon Sep 17 00:00:00 2001 From: Steffen Pankratz Date: Sat, 20 Mar 2021 22:48:38 +0100 Subject: [PATCH 5/6] fix ISO C++11 does not allow conversion from string literal to 'char *' Signed-off-by: Steffen Pankratz --- src/tools/ebuspicloader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/ebuspicloader.cpp b/src/tools/ebuspicloader.cpp index 1bb7c3bd..4c3f2a63 100644 --- a/src/tools/ebuspicloader.cpp +++ b/src/tools/ebuspicloader.cpp @@ -904,7 +904,7 @@ int main(int argc, char* argv[]) { printFileChecksum(); exit(EXIT_SUCCESS); } else { - argp_help(&aargp, stderr, ARGP_HELP_STD_ERR, "ebuspicloader"); + argp_help(&aargp, stderr, ARGP_HELP_STD_ERR, const_cast("ebuspicloader")); exit(EXIT_FAILURE); } } From b6be30f78cee59ec12f26561b7747e5ca564f73f Mon Sep 17 00:00:00 2001 From: Steffen Pankratz Date: Mon, 12 Apr 2021 20:21:33 +0200 Subject: [PATCH 6/6] fix conversion from 'long unsigned int' to 'int' warning Signed-off-by: Steffen Pankratz --- src/lib/ebus/datatype.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ebus/datatype.cpp b/src/lib/ebus/datatype.cpp index 82bd9a8d..7a3424c9 100755 --- a/src/lib/ebus/datatype.cpp +++ b/src/lib/ebus/datatype.cpp @@ -351,7 +351,7 @@ result_t DateTimeDataType::readSymbols(size_t offset, size_t length, const Symbo } *output << dec << setfill('0') << setw(2) << static_cast(d) << "." << setw(2) << static_cast(m) << "." << static_cast(y + 1900); - m = (int)(minutes%(24*60)); + m = static_cast(minutes%(24*60)); d = m/60; *output << " " << setw(2) << dec << setfill('0') << static_cast(d); m -= d*60;