You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2019/05/27 09:41:56 UTC

[plc4x] branch develop updated: - Disabled the "with-cpp" profile in jenkins till the c++ is fixed. - Fixed some issues in the way I commented out things in the CMakeList.txt files - Got rid of some compiler warnings

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new 6145e22  - Disabled the "with-cpp" profile in jenkins till the c++ is fixed. - Fixed some issues in the way I commented out things in the CMakeList.txt files - Got rid of some compiler warnings
6145e22 is described below

commit 6145e22c9d5e6df0cdf5800a7d71fcaf18749a4b
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Mon May 27 11:41:41 2019 +0200

    - Disabled the "with-cpp" profile in jenkins till the c++ is fixed.
    - Fixed some issues in the way I commented out things in the CMakeList.txt files
    - Got rid of some compiler warnings
---
 Jenkinsfile                                         |  6 +++---
 plc4cpp/api/CMakeLists.txt                          |  1 -
 plc4cpp/examples/CMakeLists.txt                     |  2 +-
 plc4cpp/integrations/apache-mynewt/CMakeLists.txt   |  2 +-
 plc4cpp/integrations/edgex-foundry/CMakeLists.txt   |  2 +-
 .../base/messages/items/DefaultBooleanFieldItem.cpp | 21 +++++++--------------
 .../base/messages/items/DefaultByteFieldItem.cpp    |  5 ++---
 .../items/DefaultLocalDateTimeFieldItem.cpp         |  4 ++--
 .../messages/items/DefaultLocalTimeFieldItem.cpp    |  4 ++--
 .../base/messages/items/DefaultShortFieldItem.cpp   |  2 +-
 plc4cpp/utils/logger/CMakeLists.txt                 |  3 +--
 11 files changed, 21 insertions(+), 31 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index c4b06e1..fbf5f07 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -106,7 +106,7 @@ pipeline {
 
                 // We'll deploy to a relative directory so we can save
                 // that and deploy in a later step on a different node
-                sh 'mvn -P${JENKINS_PROFILE},development,with-cpp,with-java,with-dotnet,with-python,with-proxies,with-sandbox ${MVN_TEST_FAIL_IGNORE} ${JQASSISTANT_NEO4J_VERSION} -DaltDeploymentRepository=snapshot-repo::default::file:./local-snapshots-dir clean deploy'
+                sh 'mvn -P${JENKINS_PROFILE},development,with-java,with-dotnet,with-python,with-proxies,with-sandbox ${MVN_TEST_FAIL_IGNORE} ${JQASSISTANT_NEO4J_VERSION} -DaltDeploymentRepository=snapshot-repo::default::file:./local-snapshots-dir clean deploy'
 
                 // Stash the build results so we can deploy them on another node
                 stash name: 'plc4x-build-snapshots', includes: 'local-snapshots-dir/**'
@@ -126,7 +126,7 @@ pipeline {
             steps {
                 echo 'Checking Code Quality'
                 withSonarQubeEnv('ASF Sonar Analysis') {
-                    sh 'mvn -P${JENKINS_PROFILE},with-cpp,with-java,with-dotnet,with-python,with-proxies sonar:sonar'
+                    sh 'mvn -P${JENKINS_PROFILE},with-java,with-dotnet,with-python,with-proxies sonar:sonar'
                 }
             }
         }
@@ -167,7 +167,7 @@ pipeline {
             }
             steps {
                 echo 'Building Site'
-                sh 'mvn -P${JENKINS_PROFILE} -P${JENKINS_PROFILE},with-cpp,with-java,with-dotnet,with-python,with-proxies site'
+                sh 'mvn -P${JENKINS_PROFILE} -P${JENKINS_PROFILE},with-java,with-dotnet,with-python,with-proxies site'
             }
         }
 
diff --git a/plc4cpp/api/CMakeLists.txt b/plc4cpp/api/CMakeLists.txt
index 9db5fc7..73badbe 100644
--- a/plc4cpp/api/CMakeLists.txt
+++ b/plc4cpp/api/CMakeLists.txt
@@ -73,4 +73,3 @@ add_library(plc4cpp-api src/main/cpp/org/apache/plc4x/cpp/api/PlcConnection.cpp
     Import the boost headers
 ]]
 target_include_directories (plc4cpp-api PUBLIC target/dependencies/include)
-
diff --git a/plc4cpp/examples/CMakeLists.txt b/plc4cpp/examples/CMakeLists.txt
index 1989a97..680665c 100644
--- a/plc4cpp/examples/CMakeLists.txt
+++ b/plc4cpp/examples/CMakeLists.txt
@@ -17,4 +17,4 @@
   under the License.
 ]]
 
-//add_subdirectory(module-name)
+#add_subdirectory(module-name)
diff --git a/plc4cpp/integrations/apache-mynewt/CMakeLists.txt b/plc4cpp/integrations/apache-mynewt/CMakeLists.txt
index 1989a97..680665c 100644
--- a/plc4cpp/integrations/apache-mynewt/CMakeLists.txt
+++ b/plc4cpp/integrations/apache-mynewt/CMakeLists.txt
@@ -17,4 +17,4 @@
   under the License.
 ]]
 
-//add_subdirectory(module-name)
+#add_subdirectory(module-name)
diff --git a/plc4cpp/integrations/edgex-foundry/CMakeLists.txt b/plc4cpp/integrations/edgex-foundry/CMakeLists.txt
index 1989a97..680665c 100644
--- a/plc4cpp/integrations/edgex-foundry/CMakeLists.txt
+++ b/plc4cpp/integrations/edgex-foundry/CMakeLists.txt
@@ -17,4 +17,4 @@
   under the License.
 ]]
 
-//add_subdirectory(module-name)
+#add_subdirectory(module-name)
diff --git a/plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/messages/items/DefaultBooleanFieldItem.cpp b/plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/messages/items/DefaultBooleanFieldItem.cpp
index 0b695c6..38c69b9 100644
--- a/plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/messages/items/DefaultBooleanFieldItem.cpp
+++ b/plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/messages/items/DefaultBooleanFieldItem.cpp
@@ -47,8 +47,7 @@ namespace org
 							// ===================================================
 							bool DefaultBooleanFieldItem::isValidByte(int index)
 							{
-								bool value = getValue(index);
-								return value <= -127 && value >= -128;
+								return true;
 							}
 
 							// ===================================================
@@ -64,8 +63,7 @@ namespace org
 							// ===================================================
 							bool DefaultBooleanFieldItem::isValidShort(int index)
 							{
-								bool value = getValue(index);
-								return value >= -32768 && value <= 32767;
+								return true;
 							}
 
 							// ===================================================
@@ -82,8 +80,7 @@ namespace org
 							// ===================================================
 							bool DefaultBooleanFieldItem::isValidInteger(int index)
 							{
-								bool value = getValue(index);
-								return value >= 0 && value <= 2147483647;
+								return true;
 							}
 
 							// ===================================================
@@ -100,8 +97,7 @@ namespace org
 							// ===================================================
 							bool DefaultBooleanFieldItem::isValidLong(int index)
 							{
-								bool value = getValue(index);
-								return value >= -(2 ^ 63) && value <= (2 ^ 63) - 1;
+								return true;
 							}
 
 							// ===================================================
@@ -136,8 +132,7 @@ namespace org
 							// ===================================================
 							bool DefaultBooleanFieldItem::isValidFloat(int index)
 							{
-								bool value = getValue(index);
-								return value >= -3.4e38 && value <= 3.4e38;
+								return true;
 							}
 
 							// ===================================================
@@ -154,8 +149,7 @@ namespace org
 							// ===================================================
 							bool DefaultBooleanFieldItem::isValidDouble(int index)
 							{
-								bool value = getValue(index);
-								return value >= -1.7e308 && value <= 1.7e308;
+								return true;
 							}
 
 							// ===================================================
@@ -172,8 +166,7 @@ namespace org
 							// ===================================================
 							bool DefaultBooleanFieldItem::isValidBigDecimal(int index)
 							{
-								// same limits but higher precision
-								return isValidDouble(index);
+								return true;
 							}
 
 							// ===================================================
diff --git a/plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/messages/items/DefaultByteFieldItem.cpp b/plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/messages/items/DefaultByteFieldItem.cpp
index 5f2c132..0453ff0 100644
--- a/plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/messages/items/DefaultByteFieldItem.cpp
+++ b/plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/messages/items/DefaultByteFieldItem.cpp
@@ -64,8 +64,7 @@ namespace org
 							// ===================================================
 							bool DefaultByteFieldItem::isValidShort(int index)
 							{
-								char value = getValue(index);
-								return value >= -32768 && value <= 32767;
+								return true;
 							}
 
 							// ===================================================
@@ -83,7 +82,7 @@ namespace org
 							bool DefaultByteFieldItem::isValidInteger(int index)
 							{
 								char value = getValue(index);
-								return value >= 0 && value <= 2147483647;
+								return value >= 0;
 							}
 
 							// ===================================================
diff --git a/plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/messages/items/DefaultLocalDateTimeFieldItem.cpp b/plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/messages/items/DefaultLocalDateTimeFieldItem.cpp
index a4ba5ee..3b9e1c5 100644
--- a/plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/messages/items/DefaultLocalDateTimeFieldItem.cpp
+++ b/plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/messages/items/DefaultLocalDateTimeFieldItem.cpp
@@ -36,7 +36,7 @@ namespace org
 							// ==================================================
 							bool DefaultLocalDateTimeFieldItem::isValidTime(int index)
 							{
-								return getValue(index) != NULL; ;
+								return true;
 							}
 
 							// ===================================================
@@ -65,7 +65,7 @@ namespace org
 							// ===================================================
 							bool DefaultLocalDateTimeFieldItem::isValidDate(int index)
 							{
-								return getValue(index) != NULL;
+								return true;
 							}
 
 							// ===================================================
diff --git a/plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/messages/items/DefaultLocalTimeFieldItem.cpp b/plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/messages/items/DefaultLocalTimeFieldItem.cpp
index f1538ec..f688f0f 100644
--- a/plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/messages/items/DefaultLocalTimeFieldItem.cpp
+++ b/plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/messages/items/DefaultLocalTimeFieldItem.cpp
@@ -36,7 +36,7 @@ namespace org
 							// ==================================================
 							bool DefaultLocalTimeFieldItem::isValidTime(int index)
 							{
-								return getValue(index) != NULL; ;
+								return true;
 							}
 
 							// ===================================================
@@ -65,7 +65,7 @@ namespace org
 							// ===================================================
 							bool DefaultLocalTimeFieldItem::isValidDate(int index)
 							{
-								return getValue(index) != NULL;
+								return true;
 							}
 
 							// ===================================================
diff --git a/plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/messages/items/DefaultShortFieldItem.cpp b/plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/messages/items/DefaultShortFieldItem.cpp
index 6a8950a..c2a94dd 100644
--- a/plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/messages/items/DefaultShortFieldItem.cpp
+++ b/plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/messages/items/DefaultShortFieldItem.cpp
@@ -83,7 +83,7 @@ namespace org
 							bool DefaultShortFieldItem::isValidInteger(int index)
 							{
 								data_type value = getValue(index);
-								return value >= 0 && value <= 2147483647;
+								return value >= 0;
 							}
 
 							// ===================================================
diff --git a/plc4cpp/utils/logger/CMakeLists.txt b/plc4cpp/utils/logger/CMakeLists.txt
index eccf20e..65f9841 100644
--- a/plc4cpp/utils/logger/CMakeLists.txt
+++ b/plc4cpp/utils/logger/CMakeLists.txt
@@ -22,8 +22,7 @@ set(CMAKE_CXX_STANDARD 11)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
 set(CMAKE_CXX_EXTENSIONS OFF)
 
-add_library(plc4cpp-utils-logger 
-		src/main/cpp/org/apache/plc4x/cpp/utils/logger/BLogger.cpp
+add_library(plc4cpp-utils-logger src/main/cpp/org/apache/plc4x/cpp/utils/logger/BLogger.cpp
         src/main/cpp/org/apache/plc4x/cpp/utils/logger/DatDmp.cpp
 		src/main/cpp/org/apache/plc4x/cpp/utils/logger/DbgTrace.cpp
 		src/main/cpp/org/apache/plc4x/cpp/utils/logger/ErrorCategory.cpp