celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpe...@apache.org
Subject svn commit: r1628725 - in /celix/trunk/framework/private/src: framework.c resolver.c service_registry.c
Date Wed, 01 Oct 2014 14:54:57 GMT
Author: bpetri
Date: Wed Oct  1 14:54:56 2014
New Revision: 1628725

URL: http://svn.apache.org/r1628725
Log:
CELIX-156: some tiny code changes to get rid of some warnings

Modified:
    celix/trunk/framework/private/src/framework.c
    celix/trunk/framework/private/src/resolver.c
    celix/trunk/framework/private/src/service_registry.c

Modified: celix/trunk/framework/private/src/framework.c
URL: http://svn.apache.org/viewvc/celix/trunk/framework/private/src/framework.c?rev=1628725&r1=1628724&r2=1628725&view=diff
==============================================================================
--- celix/trunk/framework/private/src/framework.c (original)
+++ celix/trunk/framework/private/src/framework.c Wed Oct  1 14:54:56 2014
@@ -162,7 +162,6 @@ framework_logger_pt logger;
 
 celix_status_t framework_create(framework_pt *framework, apr_pool_t *pool, properties_pt
config) {
     celix_status_t status = CELIX_SUCCESS;
-    char *error = NULL;
 
     logger = hashMap_get(config, "logger");
     if (logger == NULL) {
@@ -213,7 +212,6 @@ celix_status_t framework_create(framewor
             fw_logCode((*framework)->logger, OSGI_FRAMEWORK_LOG_ERROR, status, "Could
not create framework");
         }
     } else {
-        error = "FW exception";
         status = CELIX_FRAMEWORK_EXCEPTION;
         fw_logCode(logger, OSGI_FRAMEWORK_LOG_ERROR, CELIX_ENOMEM, "Could not create framework");
     }
@@ -1794,7 +1792,7 @@ celix_status_t framework_setBundleStateA
 		fw_log(framework->logger, OSGI_FRAMEWORK_LOG_ERROR,  "Failed to unlock");
 		return CELIX_BUNDLE_EXCEPTION;
 	}
-	return CELIX_SUCCESS;
+	return ret;
 }
 
 celix_status_t framework_acquireBundleLock(framework_pt framework, bundle_pt bundle, int
desiredStates) {

Modified: celix/trunk/framework/private/src/resolver.c
URL: http://svn.apache.org/viewvc/celix/trunk/framework/private/src/resolver.c?rev=1628725&r1=1628724&r2=1628725&view=diff
==============================================================================
--- celix/trunk/framework/private/src/resolver.c (original)
+++ celix/trunk/framework/private/src/resolver.c Wed Oct  1 14:54:56 2014
@@ -125,9 +125,6 @@ int resolver_populateCandidatesMap(hash_
     int c;
     requirement_pt req;
     capability_list_pt capList;
-    bundle_pt bundle = NULL;
-
-    bundle = module_getBundle(targetModule);
 
 	if (hashMap_containsKey(candidatesMap, targetModule)) {
 		return 0;
@@ -248,9 +245,6 @@ void resolver_addModule(module_pt module
     int i;
     capability_pt cap;
     capability_list_pt list;
-	bundle_pt bundle = NULL;
-
-	bundle = module_getBundle(module);
 
 	if (m_modules == NULL) {
 	                linkedList_create(&m_modules);
@@ -307,9 +301,6 @@ void resolver_removeModule(module_pt mod
 void resolver_moduleResolved(module_pt module) {
     int capIdx;
     linked_list_pt capsCopy;
-	bundle_pt bundle = NULL;
-
-	bundle = module_getBundle(module);
 
 	if (module_isResolved(module)) {
 	        if (linkedList_create(&capsCopy) == CELIX_SUCCESS) {
@@ -387,11 +378,8 @@ capability_list_pt resolver_getCapabilit
 
 linked_list_pt resolver_populateWireMap(hash_map_pt candidates, module_pt importer, linked_list_pt
wireMap) {
     linked_list_pt serviceWires;
-	bundle_pt bundle = NULL;
 	bool resolved = false;
 
-	bundle = module_getBundle(importer);
-
     if (candidates && importer && wireMap) {
         linked_list_pt candSetList = NULL;
 		if (module_isResolved(importer)) {

Modified: celix/trunk/framework/private/src/service_registry.c
URL: http://svn.apache.org/viewvc/celix/trunk/framework/private/src/service_registry.c?rev=1628725&r1=1628724&r2=1628725&view=diff
==============================================================================
--- celix/trunk/framework/private/src/service_registry.c (original)
+++ celix/trunk/framework/private/src/service_registry.c Wed Oct  1 14:54:56 2014
@@ -512,7 +512,7 @@ celix_status_t serviceRegistry_getServic
 	}
 	celixThreadMutex_unlock(&registry->mutex);
 
-	return CELIX_SUCCESS;
+	return status;
 }
 
 celix_status_t serviceRegistry_ungetService(service_registry_pt registry, bundle_pt bundle,
service_reference_pt reference, bool *result) {
@@ -541,7 +541,7 @@ celix_status_t serviceRegistry_ungetServ
 
 	*result = true;
 
-	return CELIX_SUCCESS;
+	return status;
 }
 
 void serviceRegistry_ungetServices(service_registry_pt registry, bundle_pt bundle) {



Mime
View raw message