incubator-celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abroekh...@apache.org
Subject svn commit: r1530579 - in /incubator/celix/trunk: deployment_admin/private/src/ device_access/device_access/private/src/ framework/private/mock/ framework/private/src/ framework/private/test/ remote_services/discovery_bonjour/ remote_services/discovery...
Date Wed, 09 Oct 2013 12:17:45 GMT
Author: abroekhuis
Date: Wed Oct  9 12:17:44 2013
New Revision: 1530579

URL: http://svn.apache.org/r1530579
Log:
CELIX-56: Fixed all warnings on Clang (Mac OSX 10.8).

Modified:
    incubator/celix/trunk/deployment_admin/private/src/miniunz.c
    incubator/celix/trunk/deployment_admin/private/src/unzip.c
    incubator/celix/trunk/device_access/device_access/private/src/driver_attributes.c
    incubator/celix/trunk/framework/private/mock/attribute_mock.c
    incubator/celix/trunk/framework/private/mock/bundle_archive_mock.c
    incubator/celix/trunk/framework/private/mock/framework_mock.c
    incubator/celix/trunk/framework/private/mock/module_mock.c
    incubator/celix/trunk/framework/private/mock/requirement_mock.c
    incubator/celix/trunk/framework/private/mock/version_range_mock.c
    incubator/celix/trunk/framework/private/src/framework.c
    incubator/celix/trunk/framework/private/src/service_registry.c
    incubator/celix/trunk/framework/private/src/unzip.c
    incubator/celix/trunk/framework/private/test/bundle_context_test.cpp
    incubator/celix/trunk/framework/private/test/service_registry_test.cpp
    incubator/celix/trunk/remote_services/discovery_bonjour/CMakeLists.txt
    incubator/celix/trunk/remote_services/discovery_bonjour/private/src/discovery.c
    incubator/celix/trunk/remote_services/discovery_slp/CMakeLists.txt
    incubator/celix/trunk/remote_services/discovery_slp/private/src/discovery.c
    incubator/celix/trunk/utils/private/src/array_list.c
    incubator/celix/trunk/utils/private/src/linked_list_iterator.c
    incubator/celix/trunk/utils/private/test/array_list_test.cpp
    incubator/celix/trunk/utils/private/test/hash_map_test.c

Modified: incubator/celix/trunk/deployment_admin/private/src/miniunz.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/deployment_admin/private/src/miniunz.c?rev=1530579&r1=1530578&r2=1530579&view=diff
==============================================================================
--- incubator/celix/trunk/deployment_admin/private/src/miniunz.c (original)
+++ incubator/celix/trunk/deployment_admin/private/src/miniunz.c Wed Oct  9 12:17:44 2013
@@ -19,7 +19,7 @@
  *   3. This notice may not be removed or altered from any source distribution.
  *
  * ----------------------------------------------------------
-/*
+ */
 /*
    miniunz.c
    Version 1.1, February 14h, 2010

Modified: incubator/celix/trunk/deployment_admin/private/src/unzip.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/deployment_admin/private/src/unzip.c?rev=1530579&r1=1530578&r2=1530579&view=diff
==============================================================================
--- incubator/celix/trunk/deployment_admin/private/src/unzip.c (original)
+++ incubator/celix/trunk/deployment_admin/private/src/unzip.c Wed Oct  9 12:17:44 2013
@@ -1696,7 +1696,7 @@ extern int ZEXPORT unzReadCurrentFile  (
         return UNZ_PARAMERROR;
 
 
-    if ((pfile_in_zip_read_info->read_buffer == NULL))
+    if (pfile_in_zip_read_info->read_buffer == NULL)
         return UNZ_END_OF_LIST_OF_FILE;
     if (len==0)
         return 0;

Modified: incubator/celix/trunk/device_access/device_access/private/src/driver_attributes.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/device_access/device_access/private/src/driver_attributes.c?rev=1530579&r1=1530578&r2=1530579&view=diff
==============================================================================
--- incubator/celix/trunk/device_access/device_access/private/src/driver_attributes.c (original)
+++ incubator/celix/trunk/device_access/device_access/private/src/driver_attributes.c Wed
Oct  9 12:17:44 2013
@@ -128,7 +128,7 @@ celix_status_t static get_property_from_
 		if (status == CELIX_SUCCESS) {
 			(*prop_value) = properties_get(properties, key);
 
-			if ((*prop_value == NULL)) {
+			if (*prop_value == NULL) {
 				status = CELIX_ENOMEM;
 			}
 		}

Modified: incubator/celix/trunk/framework/private/mock/attribute_mock.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/mock/attribute_mock.c?rev=1530579&r1=1530578&r2=1530579&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/mock/attribute_mock.c (original)
+++ incubator/celix/trunk/framework/private/mock/attribute_mock.c Wed Oct  9 12:17:44 2013
@@ -32,21 +32,21 @@ celix_status_t attribute_create(apr_pool
 			->withPointerParameters("pool", memory_pool)
 			->withStringParameters("key", key)
 			->withStringParameters("value", value)
-			->_andPointerOutputParameters("attribute", attribute);
+			->_andPointerOutputParameters("attribute", (void **) attribute);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t attribute_getKey(attribute_pt attribute, char **key) {
 	mock_c()->actualCall("attribute_getKey")
 			->withPointerParameters("attribute", attribute)
-			->_andStringOutputParameters("key", key);
+			->_andStringOutputParameters("key", (const char **) key);
 	return mock_c()->returnValue().value.intValue;
 }
 
 celix_status_t attribute_getValue(attribute_pt attribute, char **value) {
 	mock_c()->actualCall("attribute_getValue")
 			->withPointerParameters("attribute", attribute)
-			->_andStringOutputParameters("value", value);
+			->_andStringOutputParameters("value", (const char **) value);
 	return mock_c()->returnValue().value.intValue;
 }
 

Modified: incubator/celix/trunk/framework/private/mock/bundle_archive_mock.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/mock/bundle_archive_mock.c?rev=1530579&r1=1530578&r2=1530579&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/mock/bundle_archive_mock.c (original)
+++ incubator/celix/trunk/framework/private/mock/bundle_archive_mock.c Wed Oct  9 12:17:44
2013
@@ -56,7 +56,7 @@ celix_status_t bundleArchive_recreate(ch
 celix_status_t bundleArchive_getId(bundle_archive_pt archive, long *id) {
 	mock_c()->actualCall("bundleArchive_getId")
 			->withPointerParameters("archive", archive)
-			->_andIntOutputParameters("id", id);
+			->_andIntOutputParameters("id", (int *) id);
 	return mock_c()->returnValue().value.intValue;
 }
 

Modified: incubator/celix/trunk/framework/private/mock/framework_mock.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/mock/framework_mock.c?rev=1530579&r1=1530578&r2=1530579&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/mock/framework_mock.c (original)
+++ incubator/celix/trunk/framework/private/mock/framework_mock.c Wed Oct  9 12:17:44 2013
@@ -81,7 +81,7 @@ celix_status_t framework_getBundleEntry(
 			->withPointerParameters("bundle", bundle)
 			->withStringParameters("name", name)
 			->withPointerParameters("pool", pool)
-			->_andStringOutputParameters("entry", entry);
+			->_andStringOutputParameters("entry", (const char **) entry);
 		return mock_c()->returnValue().value.intValue;
 }
 
@@ -162,7 +162,7 @@ celix_status_t framework_ungetService(fr
 		->withPointerParameters("framework", framework)
 		->withPointerParameters("bundle", bundle)
 		->withPointerParameters("reference", reference)
-		->_andIntOutputParameters("result", result);
+		->_andIntOutputParameters("result", (int *) result);
 		return mock_c()->returnValue().value.intValue;
 }
 

Modified: incubator/celix/trunk/framework/private/mock/module_mock.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/mock/module_mock.c?rev=1530579&r1=1530578&r2=1530579&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/mock/module_mock.c (original)
+++ incubator/celix/trunk/framework/private/mock/module_mock.c Wed Oct  9 12:17:44 2013
@@ -69,7 +69,7 @@ version_pt module_getVersion(module_pt m
 celix_status_t module_getSymbolicName(module_pt module, char **symbolicName) {
 	mock_c()->actualCall("module_getSymbolicName")
 		->withPointerParameters("module", module)
-		->_andStringOutputParameters("symbolicName", symbolicName);
+		->_andStringOutputParameters("symbolicName", (const char **) symbolicName);
 	return mock_c()->returnValue().value.intValue;
 }
 

Modified: incubator/celix/trunk/framework/private/mock/requirement_mock.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/mock/requirement_mock.c?rev=1530579&r1=1530578&r2=1530579&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/mock/requirement_mock.c (original)
+++ incubator/celix/trunk/framework/private/mock/requirement_mock.c Wed Oct  9 12:17:44 2013
@@ -32,7 +32,7 @@ celix_status_t requirement_create(apr_po
 			->withPointerParameters("pool", pool)
 			->withPointerParameters("directives", directives)
 			->withPointerParameters("attributes", attributes)
-			->_andPointerOutputParameters("requirement", requirement);
+			->_andPointerOutputParameters("requirement", (void **) requirement);
 	return mock_c()->returnValue().value.intValue;
 }
 

Modified: incubator/celix/trunk/framework/private/mock/version_range_mock.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/mock/version_range_mock.c?rev=1530579&r1=1530578&r2=1530579&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/mock/version_range_mock.c (original)
+++ incubator/celix/trunk/framework/private/mock/version_range_mock.c Wed Oct  9 12:17:44
2013
@@ -41,7 +41,7 @@ celix_status_t versionRange_isInRange(ve
 	mock_c()->actualCall("versionRange_isInRange")
 			->withPointerParameters("versionRange", versionRange)
 			->withPointerParameters("version", version)
-			->_andIntOutputParameters("inRange", inRange);
+			->_andIntOutputParameters("inRange", (int *) inRange);
 	return mock_c()->returnValue().value.intValue;
 }
 

Modified: incubator/celix/trunk/framework/private/src/framework.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/framework.c?rev=1530579&r1=1530578&r2=1530579&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/framework.c (original)
+++ incubator/celix/trunk/framework/private/src/framework.c Wed Oct  9 12:17:44 2013
@@ -169,7 +169,7 @@ struct request {
 	event_type_e type;
 	array_list_pt listeners;
 
-	int eventType;
+	bundle_event_type_e eventType;
 	bundle_pt bundle;
 
 	char *filter;
@@ -2018,7 +2018,7 @@ static void *APR_THREAD_FUNC fw_eventDis
 					fw_bundle_listener_pt listener = (fw_bundle_listener_pt) arrayList_get(request->listeners,
i);
 					bundle_event_pt event = (bundle_event_pt) apr_palloc(listener->listener->pool,
sizeof(*event));
 					event->bundle = request->bundle;
-					event->type = request->type;
+					event->type = request->eventType;
 
 					fw_invokeBundleListener(framework, listener->listener, event, listener->bundle);
 				}

Modified: incubator/celix/trunk/framework/private/src/service_registry.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/service_registry.c?rev=1530579&r1=1530578&r2=1530579&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/service_registry.c (original)
+++ incubator/celix/trunk/framework/private/src/service_registry.c Wed Oct  9 12:17:44 2013
@@ -43,8 +43,11 @@ celix_status_t serviceRegistry_removeHoo
 
 apr_status_t serviceRegistry_removeReference(void *referenceP);
 
-celix_status_t serviceRegistry_create(apr_pool_t *pool, framework_pt framework, serviceChanged_function_pt
serviceChanged, service_registry_pt *registry) {
+celix_status_t serviceRegistry_create(apr_pool_t *ppool, framework_pt framework, serviceChanged_function_pt
serviceChanged, service_registry_pt *registry) {
 	celix_status_t status = CELIX_SUCCESS;
+	apr_pool_t *pool = NULL;
+
+	apr_pool_create(&pool, ppool);
 
 	*registry = (service_registry_pt) apr_palloc(pool, (sizeof(**registry)));
 	if (!*registry) {
@@ -96,10 +99,16 @@ celix_status_t serviceRegistry_getUsageC
 	for (i = 0; (usages != NULL) && (i < arrayList_size(usages)); i++) {
 		usage_count_pt usage = (usage_count_pt) arrayList_get(usages, i);
 		// @TODO use reference_equals!
+		bool equals = false;
+//		serviceReference_equals(usage->reference, reference, &equals);
 		if (usage->reference == reference) {
 			*usageCount = usage;
 			break;
 		}
+		if (equals) {
+			*usageCount = usage;
+			break;
+		}
 	}
 	return CELIX_SUCCESS;
 }

Modified: incubator/celix/trunk/framework/private/src/unzip.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/unzip.c?rev=1530579&r1=1530578&r2=1530579&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/unzip.c (original)
+++ incubator/celix/trunk/framework/private/src/unzip.c Wed Oct  9 12:17:44 2013
@@ -1696,7 +1696,7 @@ extern int ZEXPORT unzReadCurrentFile  (
         return UNZ_PARAMERROR;
 
 
-    if ((pfile_in_zip_read_info->read_buffer == NULL))
+    if (pfile_in_zip_read_info->read_buffer == NULL)
         return UNZ_END_OF_LIST_OF_FILE;
     if (len==0)
         return 0;

Modified: incubator/celix/trunk/framework/private/test/bundle_context_test.cpp
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/test/bundle_context_test.cpp?rev=1530579&r1=1530578&r2=1530579&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/test/bundle_context_test.cpp (original)
+++ incubator/celix/trunk/framework/private/test/bundle_context_test.cpp Wed Oct  9 12:17:44
2013
@@ -352,12 +352,12 @@ TEST(bundle_context, ungetService) {
 		.andOutputParameter("result", result)
 		.andReturnValue(CELIX_SUCCESS);
 
-	bool actualResult = NULL;
+	bool actualResult = false;
 	celix_status_t status = bundleContext_ungetService(context, serviceReference, &actualResult);
 	LONGS_EQUAL(CELIX_SUCCESS, status);
 	LONGS_EQUAL(result, actualResult);
 
-	actualResult = NULL;
+	actualResult = false;
 	status = bundleContext_ungetService(context, NULL, &actualResult);
 	LONGS_EQUAL(CELIX_ILLEGAL_ARGUMENT, status);
 }

Modified: incubator/celix/trunk/framework/private/test/service_registry_test.cpp
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/test/service_registry_test.cpp?rev=1530579&r1=1530578&r2=1530579&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/test/service_registry_test.cpp (original)
+++ incubator/celix/trunk/framework/private/test/service_registry_test.cpp Wed Oct  9 12:17:44
2013
@@ -499,6 +499,7 @@ TEST(service_registry, ungetServivces) {
 	arrayList_create(pool, &usages);
 	usage_count_pt usage = (usage_count_pt) malloc(sizeof(*usage));
 	usage->reference = reference;
+	usage->count = 1;
 	apr_pool_create(&usage->pool, pool);
 	arrayList_add(usages, usage);
 	hashMap_put(registry->inUseMap, bundle, usages);
@@ -513,6 +514,12 @@ TEST(service_registry, ungetServivces) {
 		.withParameter("reference", reference)
 		.andOutputParameter("registration", registration)
 		.andReturnValue(CELIX_SUCCESS);
+//	mock()
+//		.expectOneCall("serviceReference_equals")
+//		.withParameter("reference", reference)
+//		.withParameter("compareTo", reference)
+//		.andOutputParameter("equal", true)
+//		.andReturnValue(CELIX_SUCCESS);
 	mock()
 		.expectOneCall("serviceRegistration_isValid")
 		.withParameter("registration", registration)

Modified: incubator/celix/trunk/remote_services/discovery_bonjour/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/remote_services/discovery_bonjour/CMakeLists.txt?rev=1530579&r1=1530578&r2=1530579&view=diff
==============================================================================
--- incubator/celix/trunk/remote_services/discovery_bonjour/CMakeLists.txt (original)
+++ incubator/celix/trunk/remote_services/discovery_bonjour/CMakeLists.txt Wed Oct  9 12:17:44
2013
@@ -20,7 +20,7 @@
 include_directories("/usr/include") #TODO check if this has impact on the generated project
indexer paths
 include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
 include_directories("${PROJECT_SOURCE_DIR}/remote_services/utils/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/remote_services/discovery/private/include")
+include_directories("${PROJECT_SOURCE_DIR}/remote_services/discovery_bonjour/private/include")
 include_directories("${PROJECT_SOURCE_DIR}/remote_services/endpoint_listener/public/include")
 include_directories("${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin/public/include")
 include_directories(private/include)

Modified: incubator/celix/trunk/remote_services/discovery_bonjour/private/src/discovery.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/remote_services/discovery_bonjour/private/src/discovery.c?rev=1530579&r1=1530578&r2=1530579&view=diff
==============================================================================
--- incubator/celix/trunk/remote_services/discovery_bonjour/private/src/discovery.c (original)
+++ incubator/celix/trunk/remote_services/discovery_bonjour/private/src/discovery.c Wed Oct
 9 12:17:44 2013
@@ -126,7 +126,7 @@ celix_status_t discovery_create(apr_pool
 		char *port = NULL;
 		bundleContext_getProperty(context, "DISCOVERY_PORT", &port);
 		if (port == NULL) {
-			(*discovery)->discoveryPort = (char *)DEFAULT_DISCOVERY_PORT;
+			(*discovery)->discoveryPort = (char *) DEFAULT_DISCOVERY_PORT;
 		} else {
 			(*discovery)->discoveryPort = apr_pstrdup(pool, port);
 		}

Modified: incubator/celix/trunk/remote_services/discovery_slp/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/remote_services/discovery_slp/CMakeLists.txt?rev=1530579&r1=1530578&r2=1530579&view=diff
==============================================================================
--- incubator/celix/trunk/remote_services/discovery_slp/CMakeLists.txt (original)
+++ incubator/celix/trunk/remote_services/discovery_slp/CMakeLists.txt Wed Oct  9 12:17:44
2013
@@ -20,7 +20,7 @@ find_package(Slp REQUIRED)
 include_directories(${SLP_INCLUDE_DIRS})
 include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
 include_directories("${PROJECT_SOURCE_DIR}/remote_services/utils/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/remote_services/discovery/private/include")
+include_directories("${PROJECT_SOURCE_DIR}/remote_services/discovery_slp/private/include")
 include_directories("${PROJECT_SOURCE_DIR}/remote_services/endpoint_listener/public/include")
 include_directories("${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin/public/include")
 include_directories("private/include")

Modified: incubator/celix/trunk/remote_services/discovery_slp/private/src/discovery.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/remote_services/discovery_slp/private/src/discovery.c?rev=1530579&r1=1530578&r2=1530579&view=diff
==============================================================================
--- incubator/celix/trunk/remote_services/discovery_slp/private/src/discovery.c (original)
+++ incubator/celix/trunk/remote_services/discovery_slp/private/src/discovery.c Wed Oct  9
12:17:44 2013
@@ -69,6 +69,8 @@ celix_status_t discovery_informListenerO
 celix_status_t discovery_addService(discovery_pt discovery, endpoint_description_pt endpoint);
 celix_status_t discovery_removeService(discovery_pt discovery, endpoint_description_pt endpoint);
 
+celix_status_t discovery_updateEndpointListener(discovery_pt discovery, service_reference_pt
reference, endpoint_listener_pt service);
+
 static void *APR_THREAD_FUNC discovery_pollSLP(apr_thread_t *thd, void *data);
 SLPBoolean discovery_pollSLPCallback(SLPHandle hslp, const char* srvurl, unsigned short lifetime,
SLPError errcode, void* cookie);
 SLPBoolean discovery_attributesCallback(SLPHandle hslp, const char *attributes, SLPError
error, void *cookie);

Modified: incubator/celix/trunk/utils/private/src/array_list.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/utils/private/src/array_list.c?rev=1530579&r1=1530578&r2=1530579&view=diff
==============================================================================
--- incubator/celix/trunk/utils/private/src/array_list.c (original)
+++ incubator/celix/trunk/utils/private/src/array_list.c Wed Oct  9 12:17:44 2013
@@ -173,7 +173,7 @@ bool arrayList_add(array_list_pt list, v
 
 int arrayList_addIndex(array_list_pt list, unsigned int index, void * element) {
 	unsigned int numMoved;
-	if (index > list->size || index < 0) {
+	if (index > list->size) {
 		return -1;
 	}
 	arrayList_ensureCapacity(list, list->size+1);

Modified: incubator/celix/trunk/utils/private/src/linked_list_iterator.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/utils/private/src/linked_list_iterator.c?rev=1530579&r1=1530578&r2=1530579&view=diff
==============================================================================
--- incubator/celix/trunk/utils/private/src/linked_list_iterator.c (original)
+++ incubator/celix/trunk/utils/private/src/linked_list_iterator.c Wed Oct  9 12:17:44 2013
@@ -39,7 +39,7 @@ struct linkedListIterator {
 
 linked_list_iterator_pt linkedListIterator_create(linked_list_pt list, unsigned int index)
{
 	linked_list_iterator_pt iterator;
-	if (index < 0 || index > list->size) {
+	if (index > list->size) {
 		return NULL;
 	}
 	iterator = (linked_list_iterator_pt) malloc(sizeof(*iterator));

Modified: incubator/celix/trunk/utils/private/test/array_list_test.cpp
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/utils/private/test/array_list_test.cpp?rev=1530579&r1=1530578&r2=1530579&view=diff
==============================================================================
--- incubator/celix/trunk/utils/private/test/array_list_test.cpp (original)
+++ incubator/celix/trunk/utils/private/test/array_list_test.cpp Wed Oct  9 12:17:44 2013
@@ -39,11 +39,11 @@ TEST(array_list, create) {
 
 TEST(array_list, trimToSize) {
 	bool added;
-	char * entry;
+	std::string entry;
 	arrayList_clear(list);
 
 	entry = "entry";
-	added = arrayList_add(list, entry);
+	added = arrayList_add(list, (char *) entry.c_str());
 	LONGS_EQUAL(list->size, 1);
 	LONGS_EQUAL(list->capacity, 10);
 
@@ -62,8 +62,8 @@ TEST(array_list, ensureCapacity) {
 
 	for (i = 0; i < 100; i++) {
 		bool added;
-		char *entry = "entry";
-		added = arrayList_add(list, entry);
+		std::string entry = "entry";
+		added = arrayList_add(list, (char *) entry.c_str());
 	}
 	LONGS_EQUAL(list->capacity, 133);
 	LONGS_EQUAL(list->size, 100);

Modified: incubator/celix/trunk/utils/private/test/hash_map_test.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/utils/private/test/hash_map_test.c?rev=1530579&r1=1530578&r2=1530579&view=diff
==============================================================================
--- incubator/celix/trunk/utils/private/test/hash_map_test.c (original)
+++ incubator/celix/trunk/utils/private/test/hash_map_test.c Wed Oct  9 12:17:44 2013
@@ -416,7 +416,7 @@ void test_hashMapValues_toArray(void) {
     char * key2 = "key2";
     char * value2 = "value2";
     char **array;
-    int size;
+    unsigned int size;
 	hash_map_values_pt values;
 
 	hashMap_clear(map, false, false);



Mime
View raw message