celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject [13/50] [abbrv] celix git commit: CELIX-412: Fixes pubsub cmake setup, fixes some compiler warnings
Date Tue, 30 Jan 2018 19:19:09 GMT
CELIX-412: Fixes pubsub cmake setup, fixes some compiler warnings


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/700ab462
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/700ab462
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/700ab462

Branch: refs/heads/master
Commit: 700ab4624f4d6c735385d27a990fd629560bf511
Parents: b0ce481
Author: Pepijn Noltes <pepijnnoltes@gmail.com>
Authored: Tue Oct 17 20:23:12 2017 +0200
Committer: Pepijn Noltes <pepijnnoltes@gmail.com>
Committed: Tue Oct 17 20:23:12 2017 +0200

----------------------------------------------------------------------
 CMakeLists.txt                                  | 18 +++----
 examples/dm_example_cxx/CMakeLists.txt          |  3 --
 examples/services_example_cxx/CMakeLists.txt    |  3 --
 pubsub/pubsub_admin_udp_mc/CMakeLists.txt       | 55 ++++++++++----------
 .../private/src/pubsub_serializer_impl.c        |  4 +-
 .../topology_manager/tms_tst/tms_tests.cpp      |  9 ++--
 6 files changed, 44 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/700ab462/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9f3023c..edc558c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,12 +33,12 @@ IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} EQUAL 3.3 AND ${CMAKE_GENERATO
 ENDIF()
 
 IF (ANDROID)
-    SET(CMAKE_C_FLAGS "-D_GNU_SOURCE -std=gnu99 -Wall ${CMAKE_C_FLAGS}")
+    set(CMAKE_C_FLAGS "-D_GNU_SOURCE -std=gnu99 -Wall ${CMAKE_C_FLAGS}")
 ELSE ()
-    SET(CMAKE_C_FLAGS "-D_GNU_SOURCE -std=gnu99 -Wall -Werror -fPIC ${CMAKE_C_FLAGS}") #TODO
add -Wextra
-    SET(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wextra -Werror") #TODO -Weffc++
-    SET(CMAKE_C_FLAGS_DEBUG "-g -DDEBUG")
-    SET(CMAKE_CXX_FLAGS_DEBUG "-g -DDEBUG")
+    set(CMAKE_C_FLAGS "-D_GNU_SOURCE -std=gnu99 -Wall -Werror -fPIC ${CMAKE_C_FLAGS}") #TODO
add -Wextra
+    set(CMAKE_CXX_FLAGS "-Wall -Werror -Wextra -Weffc++ -fno-rtti -fno-exceptions ${CMAKE_CXX_FLAGS}")
+    set(CMAKE_C_FLAGS_DEBUG "-g -DDEBUG ${CMAKE_C_FLAGS}")
+    set(CMAKE_CXX_FLAGS_DEBUG "-g -DDEBUG ${CMAKE_CXX_FLAGS}")
 ENDIF()
 
 IF(APPLE)
@@ -50,10 +50,10 @@ ELSE ()
 ENDIF()
 
 # Set version for the framework package/release
-SET(CELIX_MAJOR "1")
-SET(CELIX_MINOR "0")
-SET(CELIX_MICRO "0")
-SET(CELIX_QUALIFIER "")
+set(CELIX_MAJOR "1")
+set(CELIX_MINOR "0")
+set(CELIX_MICRO "0")
+set(CELIX_QUALIFIER "")
 
 option(ENABLE_TESTING "Enables unit/bundle testing" FALSE)
 

http://git-wip-us.apache.org/repos/asf/celix/blob/700ab462/examples/dm_example_cxx/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example_cxx/CMakeLists.txt b/examples/dm_example_cxx/CMakeLists.txt
index 2f6b1cf..a2d7ae9 100644
--- a/examples/dm_example_cxx/CMakeLists.txt
+++ b/examples/dm_example_cxx/CMakeLists.txt
@@ -15,9 +15,6 @@
 # specific language governing permissions and limitations
 # under the License.
 if (BUILD_DEPENDENCY_MANAGER_CXX)
-    #set -Wall, -Werror locally, currenctly cpputest contains warnings
-    set(CMAKE_CXX_FLAGS "-Wall -Werror -fno-rtti -fno-exceptions ${CMAKE_CXX_FLAGS}")
-
     include_directories(
             ${PROJECT_SOURCE_DIR}/dependency_manager/public/include
             ${PROJECT_SOURCE_DIR}/dependency_manager_cxx/include

http://git-wip-us.apache.org/repos/asf/celix/blob/700ab462/examples/services_example_cxx/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/services_example_cxx/CMakeLists.txt b/examples/services_example_cxx/CMakeLists.txt
index b74c454..6f45ef7 100644
--- a/examples/services_example_cxx/CMakeLists.txt
+++ b/examples/services_example_cxx/CMakeLists.txt
@@ -15,9 +15,6 @@
 # specific language governing permissions and limitations
 # under the License.
 if (BUILD_DEPENDENCY_MANAGER_CXX)
-
-    set(CMAKE_CXX_FLAGS "-Wall -Werror -fno-rtti -fno-exceptions ${CMAKE_CXX_FLAGS}")
-
     include_directories(
             ${PROJECT_SOURCE_DIR}/dependency_manager/public/include
             ${PROJECT_SOURCE_DIR}/dependency_manager_cxx/include

http://git-wip-us.apache.org/repos/asf/celix/blob/700ab462/pubsub/pubsub_admin_udp_mc/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/pubsub/pubsub_admin_udp_mc/CMakeLists.txt b/pubsub/pubsub_admin_udp_mc/CMakeLists.txt
index 9574607..3ab0c54 100644
--- a/pubsub/pubsub_admin_udp_mc/CMakeLists.txt
+++ b/pubsub/pubsub_admin_udp_mc/CMakeLists.txt
@@ -15,36 +15,35 @@
 # specific language governing permissions and limitations
 # under the License.
 
-if (BUILD_PUBSUB_PSA_UDP_MC)
-	find_package(Jansson REQUIRED)
+find_package(Jansson REQUIRED)
 
-	include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
-	include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
-	include_directories("${PROJECT_SOURCE_DIR}/dfi/public/include")
-	include_directories("${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/include")
-	include_directories("${PROJECT_SOURCE_DIR}/pubsub/api/pubsub")
-	include_directories("private/include")
-	include_directories("public/include")
-	include_directories("${JANSSON_INCLUDE_DIR}")
+include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
+include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
+include_directories("${PROJECT_SOURCE_DIR}/dfi/public/include")
+include_directories("${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/include")
+include_directories("${PROJECT_SOURCE_DIR}/pubsub/api/pubsub")
+include_directories("private/include")
+include_directories("public/include")
+include_directories("${JANSSON_INCLUDE_DIR}")
 
-	add_bundle(org.apache.celix.pubsub_admin.PubSubAdminUdpMc
-		BUNDLE_SYMBOLICNAME "apache_celix_pubsub_admin_udp_multicast"
-		VERSION "1.0.0"
-		SOURCES
-			private/src/psa_activator.c
-			private/src/pubsub_admin_impl.c
-			private/src/topic_subscription.c
-			private/src/topic_publication.c
-			private/src/large_udp.c
-		   ${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
-			${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_endpoint.c
-			${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_admin_match.c
-			${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_utils.c
-	)
+add_bundle(org.apache.celix.pubsub_admin.PubSubAdminUdpMc
+	BUNDLE_SYMBOLICNAME "apache_celix_pubsub_admin_udp_multicast"
+	VERSION "1.0.0"
+	SOURCES
+		private/src/psa_activator.c
+		private/src/pubsub_admin_impl.c
+		private/src/topic_subscription.c
+		private/src/topic_publication.c
+		private/src/large_udp.c
+	   ${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
+		${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_endpoint.c
+		${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_admin_match.c
+		${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_utils.c
+)
 
-	set_target_properties(org.apache.celix.pubsub_admin.PubSubAdminUdpMc PROPERTIES INSTALL_RPATH
"$ORIGIN")
-	target_link_libraries(org.apache.celix.pubsub_admin.PubSubAdminUdpMc celix_framework celix_utils
celix_dfi)
+set_target_properties(org.apache.celix.pubsub_admin.PubSubAdminUdpMc PROPERTIES INSTALL_RPATH
"$ORIGIN")
+target_link_libraries(org.apache.celix.pubsub_admin.PubSubAdminUdpMc celix_framework celix_utils
celix_dfi)
+
+install_bundle(org.apache.celix.pubsub_admin.PubSubAdminUdpMc)
 
-	install_bundle(org.apache.celix.pubsub_admin.PubSubAdminUdpMc)
-endif()
 

http://git-wip-us.apache.org/repos/asf/celix/blob/700ab462/pubsub/pubsub_serializer_json/private/src/pubsub_serializer_impl.c
----------------------------------------------------------------------
diff --git a/pubsub/pubsub_serializer_json/private/src/pubsub_serializer_impl.c b/pubsub/pubsub_serializer_json/private/src/pubsub_serializer_impl.c
index cffc816..7f56c52 100644
--- a/pubsub/pubsub_serializer_json/private/src/pubsub_serializer_impl.c
+++ b/pubsub/pubsub_serializer_json/private/src/pubsub_serializer_impl.c
@@ -226,8 +226,8 @@ static void pubsubSerializer_addMsgSerializerFromBundle(const char *root,
bundle
 
 			printf("DMU: Parsing entry '%s'\n", entry->d_name);
 
-			memset(path,0,128);
-			snprintf(path, 128, "%s/%s", root, entry->d_name);
+			memset(path,0,1024);
+			snprintf(path, 1024, "%s/%s", root, entry->d_name);
 			FILE *stream = fopen(path,"r");
 
 			if (stream != NULL){

http://git-wip-us.apache.org/repos/asf/celix/blob/700ab462/remote_services/topology_manager/tms_tst/tms_tests.cpp
----------------------------------------------------------------------
diff --git a/remote_services/topology_manager/tms_tst/tms_tests.cpp b/remote_services/topology_manager/tms_tst/tms_tests.cpp
index d6b05b7..0bbd4f0 100644
--- a/remote_services/topology_manager/tms_tst/tms_tests.cpp
+++ b/remote_services/topology_manager/tms_tst/tms_tests.cpp
@@ -323,15 +323,18 @@ extern "C" {
                         	 json_t* js_key2 = json_object_get(js_service, JSON_SERVICE_KEY2);
 
                              properties=properties_create();
-                             if (js_serviceZone != NULL)
+                             if (js_serviceZone != NULL) {
                         	     properties_set(properties, (char*)JSON_SERVICE_ZONE,
                         		    	                    (char*)json_string_value(js_serviceZone));
-                             if (js_key1 != NULL)
+			     }
+                             if (js_key1 != NULL) {
                         	     properties_set(properties, (char*)JSON_SERVICE_KEY1,
                         		    	 	 	  	 	    (char*)json_string_value(js_key1));
-                             if (js_key2 != NULL)
+			     }
+                             if (js_key2 != NULL) {
                                  properties_set(properties, (char*)JSON_SERVICE_KEY2,
                                     	 	 	  	 	    (char*)json_string_value(js_key2));
+			     }
 
                         	 added = tmScopeService->addExportScope(tmScopeService->handle,
(char*)json_string_value(js_filter), properties);
                              if (added == CELIX_SUCCESS) {


Mime
View raw message