Hi Alexander,

works almost out-of-the box on my fedora system.

It only seems that policy "CMP0045" is too new
for the CMake Version I am using. So I needed to
remove it to get the build working.

This is somewhat inconvenient as the latest fedora
comes with cmake 2.8.12 (for ubuntu its 2.8.7) and
therefore cmake would needed to be updated manually.

Regards,
  Bjoern




On 2014-09-29 21:16, Alexander Broekhuis wrote:
Hi all,

I've made a huge commit to fix alot of warnings. Can someone with Linux
test this? Please enable all components that can be enabled for Linux,
except for the tests, there is some needed on those.

Thanks,

2014-09-29 21:11 GMT+02:00 <[email protected]>:

Author: abroekhuis
Date: Mon Sep 29 19:11:55 2014
New Revision: 1628261

URL: http://svn.apache.org/r1628261
Log:
CELIX-156: Fixed most warnings when compiling with -Wall.

Modified:
    celix/trunk/CMakeLists.txt
    celix/trunk/cmake/cmake_celix/Test.cmake
    celix/trunk/dependency_manager/private/src/service_component.c
    celix/trunk/deployment_admin/private/src/deployment_admin.c
celix/trunk/deployment_admin/private/src/deployment_admin_activator.c
    celix/trunk/deployment_admin/private/src/log_sync.c
    celix/trunk/device_access/device_access/CMakeLists.txt
    celix/trunk/device_access/device_access/private/src/activator.c
celix/trunk/device_access/device_access/private/src/device_manager.c
    celix/trunk/device_access/driver_locator/CMakeLists.txt
    celix/trunk/device_access/driver_locator/private/src/activator.c
    celix/trunk/device_access/example/base_driver/CMakeLists.txt
    celix/trunk/device_access/example/consuming_driver/CMakeLists.txt

celix/trunk/device_access/example/consuming_driver/private/src/activator.c

celix/trunk/device_access/example/consuming_driver/private/src/consuming_driver.c
    celix/trunk/device_access/example/refining_driver/CMakeLists.txt

celix/trunk/device_access/example/refining_driver/private/src/activator.c

celix/trunk/device_access/example/refining_driver/private/src/refining_driver.c
    celix/trunk/event_admin/event_admin/CMakeLists.txt
celix/trunk/event_admin/event_admin/private/include/event_admin_impl.h
    celix/trunk/event_admin/event_admin/private/src/event_admin_impl.c
    celix/trunk/event_admin/event_admin/private/src/event_impl.c
    celix/trunk/event_admin/event_handler/CMakeLists.txt
celix/trunk/event_admin/event_handler/private/src/event_handler_impl.c
    celix/trunk/event_admin/event_publisher/CMakeLists.txt

celix/trunk/event_admin/event_publisher/private/include/event_publisher_impl.h

celix/trunk/event_admin/event_publisher/private/src/event_publisher_activator.c

celix/trunk/event_admin/event_publisher/private/src/event_publisher_impl.c
    celix/trunk/examples/hello_world_test/private/src/activator.c

celix/trunk/examples/osgi-in-action/chapter01-greeting-example/greeting/private/src/activator.c
    celix/trunk/framework/private/mock/attribute_mock.c
    celix/trunk/framework/private/mock/bundle_context_mock.c
    celix/trunk/framework/private/mock/framework_mock.c
    celix/trunk/framework/private/src/bundle_archive.c
    celix/trunk/framework/private/src/framework.c
    celix/trunk/framework/private/src/manifest.c
    celix/trunk/framework/private/src/properties.c
    celix/trunk/framework/private/src/resolver.c
    celix/trunk/framework/private/src/service_tracker.c
    celix/trunk/log_service/private/src/log_factory.c
    celix/trunk/log_writer/log_writer/private/src/log_writer.c

celix/trunk/log_writer/log_writer_syslog/private/src/log_writer_syslog.c

celix/trunk/remote_services/calculator_service/private/src/calculator_activator.c
celix/trunk/remote_services/calculator_shell/private/src/add_command.c celix/trunk/remote_services/calculator_shell/private/src/sqrt_command.c celix/trunk/remote_services/calculator_shell/private/src/sub_command.c

celix/trunk/remote_services/discovery/private/include/endpoint_descriptor_common.h
    celix/trunk/remote_services/discovery/private/src/discovery.c

celix/trunk/remote_services/discovery/private/src/endpoint_descriptor_reader.c

celix/trunk/remote_services/discovery/private/src/endpoint_descriptor_writer.c

celix/trunk/remote_services/discovery/private/src/endpoint_discovery_poller.c
celix/trunk/remote_services/discovery_bonjour/private/src/discovery.c

celix/trunk/remote_services/discovery_configured/private/src/discovery_impl.c
celix/trunk/remote_services/discovery_etcd/private/src/discovery_impl.c
    celix/trunk/remote_services/discovery_etcd/private/src/etcd.c
    celix/trunk/remote_services/discovery_shm/CMakeLists.txt
    celix/trunk/remote_services/discovery_shm/private/src/discovery.c

celix/trunk/remote_services/discovery_shm/private/src/discovery_activator.c
    celix/trunk/remote_services/discovery_slp/private/src/discovery.c

celix/trunk/remote_services/remote_service_admin_http/private/src/export_registration_impl.c

celix/trunk/remote_services/remote_service_admin_http/private/src/import_registration_impl.c

celix/trunk/remote_services/remote_service_admin_http/private/src/remote_service_admin_activator.c

celix/trunk/remote_services/remote_service_admin_http/private/src/remote_service_admin_impl.c
celix/trunk/remote_services/remote_service_admin_shm/CMakeLists.txt

celix/trunk/remote_services/topology_manager/private/src/topology_manager.c
    celix/trunk/remote_shell/CMakeLists.txt
    celix/trunk/shell/private/src/inspect_command.c
    celix/trunk/shell/private/src/log_command.c
    celix/trunk/shell/private/src/update_command.c

Modified: celix/trunk/CMakeLists.txt
URL:
http://svn.apache.org/viewvc/celix/trunk/CMakeLists.txt?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/CMakeLists.txt (original)
+++ celix/trunk/CMakeLists.txt Mon Sep 29 19:11:55 2014
@@ -30,7 +30,7 @@ set(CMAKE_INSTALL_NAME_DIR "@rpath")

 SET(CMAKE_BUILD_TYPE "Debug")
 IF(UNIX)
-       SET(CMAKE_C_FLAGS "-D_GNU_SOURCE -std=gnu99 ${CMAKE_C_FLAGS}")
+       SET(CMAKE_C_FLAGS "-D_GNU_SOURCE -std=gnu99 -Wall
${CMAKE_C_FLAGS}")
 ENDIF()
 IF(WIN32)
SET(CMAKE_C_FLAGS "-D_CRT_SECURE_NO_WARNINGS ${CMAKE_C_FLAGS}")

Modified: celix/trunk/cmake/cmake_celix/Test.cmake
URL:
http://svn.apache.org/viewvc/celix/trunk/cmake/cmake_celix/Test.cmake?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/cmake/cmake_celix/Test.cmake (original)
+++ celix/trunk/cmake/cmake_celix/Test.cmake Mon Sep 29 19:11:55 2014
@@ -44,8 +44,8 @@ MACRO(run_test)

        add_custom_target(${__testTarget}
                ${EXEC} ${EXEC}
-               COMMAND if \[ -e
${PROJECT_BINARY_DIR}/test_results/${EXEC}-Results.xml \]\; then xsltproc
--path ${CUNIT_SHARE_DIR} ${CUNIT_SHARE_DIR}/CUnit-Run.xsl
${PROJECT_BINARY_DIR}/test_results/${EXEC}-Results.xml >
${EXEC}-Results.html \; fi
-               COMMAND if \[ -e
${PROJECT_BINARY_DIR}/test_results/${EXEC}-Listing.xml \]\; then xsltproc
--path ${CUNIT_SHARE_DIR} ${CUNIT_SHARE_DIR}/CUnit-List.xsl
${PROJECT_BINARY_DIR}/test_results/${EXEC}-Listing.xml >
${EXEC}-Listing.html \; fi
+               COMMAND if \\[ -e
${PROJECT_BINARY_DIR}/test_results/${EXEC}-Results.xml \\]\; then xsltproc
--path ${CUNIT_SHARE_DIR} ${CUNIT_SHARE_DIR}/CUnit-Run.xsl
${PROJECT_BINARY_DIR}/test_results/${EXEC}-Results.xml >
${EXEC}-Results.html \; fi
+               COMMAND if \\[ -e
${PROJECT_BINARY_DIR}/test_results/${EXEC}-Listing.xml \\]\; then xsltproc
--path ${CUNIT_SHARE_DIR} ${CUNIT_SHARE_DIR}/CUnit-List.xsl
${PROJECT_BINARY_DIR}/test_results/${EXEC}-Listing.xml >
${EXEC}-Listing.html \; fi
                WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test_results
        )
        ADD_DEPENDENCIES(test_cunit ${__testTarget})

Modified: celix/trunk/dependency_manager/private/src/service_component.c
URL:
http://svn.apache.org/viewvc/celix/trunk/dependency_manager/private/src/service_component.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/dependency_manager/private/src/service_component.c
(original)
+++ celix/trunk/dependency_manager/private/src/service_component.c Mon Sep
29 19:11:55 2014
@@ -59,9 +59,9 @@ struct executor {
 };

 service_pt serviceComponent_create(bundle_context_pt context,
dependency_manager_pt manager) {
-    service_pt service;
-    apr_pool_t *pool;
-       apr_pool_t *mypool;
+    service_pt service = NULL;
+    apr_pool_t *pool = NULL;
+       apr_pool_t *mypool = NULL;

        bundleContext_getMemoryPool(context, &pool);
        apr_pool_create(&mypool, pool);

Modified: celix/trunk/deployment_admin/private/src/deployment_admin.c
URL:
http://svn.apache.org/viewvc/celix/trunk/deployment_admin/private/src/deployment_admin.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/deployment_admin/private/src/deployment_admin.c (original) +++ celix/trunk/deployment_admin/private/src/deployment_admin.c Mon Sep 29
19:11:55 2014
@@ -146,7 +146,7 @@ static celix_status_t deploymentAdmin_up
        char url[strlen(admin->auditlogUrl)+6];
        sprintf(url, "%s/send", admin->auditlogUrl);
        char entry[512];
-       int entrySize = snprintf(entry, 512, "%s,%i,%i,0,%i\n",
admin->targetIdentification, admin->auditlogId, admin->aditlogSeqNr++,
auditEvent);
+       int entrySize = snprintf(entry, 512, "%s,%lld,%u,0,%i\n",
admin->targetIdentification, admin->auditlogId, admin->aditlogSeqNr++,
auditEvent);
        if (entrySize >= 512) {
                status = CELIX_BUNDLE_EXCEPTION;
                fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "Error, entry
buffer is too small");
@@ -316,25 +316,28 @@ celix_status_t deploymentAdmin_readVersi

celix_status_t deploymentAdmin_download(char * url, char **inputFile) {
        celix_status_t status = CELIX_SUCCESS;
-       CURL *curl;
-       CURLcode res;
+       CURL *curl = NULL;
+       CURLcode res = 0;
        curl = curl_easy_init();
        if (curl) {
-               tmpnam(*inputFile);
-               FILE *fp = fopen(*inputFile, "wb+");
-               curl_easy_setopt(curl, CURLOPT_URL, url);
-               curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,
deploymentAdmin_writeData);
-               curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
-               curl_easy_setopt(curl, CURLOPT_FAILONERROR, true);
-               //curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);
-               //curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION,
updateCommand_downloadProgress);
-               res = curl_easy_perform(curl);
-               if (res != CURLE_OK) {
-                       status = CELIX_BUNDLE_EXCEPTION;
-               }
-               /* always cleanup */
-               curl_easy_cleanup(curl);
-               fclose(fp);
+           *inputFile = "updateXXXXXX";
+        int fd = mkstemp(*inputFile);
+        if (fd) {
+            FILE *fp = fopen(*inputFile, "wb+");
+            curl_easy_setopt(curl, CURLOPT_URL, url);
+            curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,
deploymentAdmin_writeData);
+            curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
+            curl_easy_setopt(curl, CURLOPT_FAILONERROR, true);
+            //curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);
+            //curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION,
updateCommand_downloadProgress);
+            res = curl_easy_perform(curl);
+            if (res != CURLE_OK) {
+                status = CELIX_BUNDLE_EXCEPTION;
+            }
+            /* always cleanup */
+            curl_easy_cleanup(curl);
+            fclose(fp);
+        }
        }
        if (res != CURLE_OK) {
                *inputFile[0] = '\0';
@@ -563,7 +566,6 @@ celix_status_t deploymentAdmin_dropDeplo
void *processorP = NULL;
                                                status =
bundleContext_getService(admin->context, ref, &processorP);
                                                if (status ==
CELIX_SUCCESS) {
- bundle_pt bundle =
NULL;
char *packageName
= NULL;

resource_processor_service_pt processor = processorP;


Modified:
celix/trunk/deployment_admin/private/src/deployment_admin_activator.c
URL:
http://svn.apache.org/viewvc/celix/trunk/deployment_admin/private/src/deployment_admin_activator.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/deployment_admin/private/src/deployment_admin_activator.c
(original)
+++ celix/trunk/deployment_admin/private/src/deployment_admin_activator.c
Mon Sep 29 19:11:55 2014
@@ -63,15 +63,12 @@ celix_status_t bundleActivator_create(bu

celix_status_t bundleActivator_start(void * userData, bundle_context_pt
context) {
        celix_status_t status = CELIX_SUCCESS;
-       struct activator *activator = userData;
-

        return status;
 }

celix_status_t bundleActivator_stop(void * userData, bundle_context_pt
context) {
        celix_status_t status = CELIX_SUCCESS;
-       struct activator *activator = userData;

        return status;
 }

Modified: celix/trunk/deployment_admin/private/src/log_sync.c
URL:
http://svn.apache.org/viewvc/celix/trunk/deployment_admin/private/src/log_sync.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/deployment_admin/private/src/log_sync.c (original)
+++ celix/trunk/deployment_admin/private/src/log_sync.c Mon Sep 29
19:11:55 2014
@@ -136,18 +136,11 @@ static void *APR_THREAD_FUNC logSync_syn
                long highest = 0;
                logStore_getHighestId(logSync->logStore, &highest);

-//             printf("Highest local: %ld\n", highest);
-//             printf("Highest remote: %ld\n", descriptor->high);
-
                if (highest >= 0) {
                        int i;
for (i = descriptor->high + 1; i <= highest; i++) {
                                array_list_pt events = NULL;
                                logStore_getEvents(logSync->logStore,
&events);
- log_event_pt event = arrayList_get(events,
i);
-//                             printf("Event id: %ld\n", event->id);
-
-
                        }
                }
                sleep(10);

Modified: celix/trunk/device_access/device_access/CMakeLists.txt
URL:
http://svn.apache.org/viewvc/celix/trunk/device_access/device_access/CMakeLists.txt?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/device_access/device_access/CMakeLists.txt (original)
+++ celix/trunk/device_access/device_access/CMakeLists.txt Mon Sep 29
19:11:55 2014
@@ -18,6 +18,7 @@
 find_package(APR REQUIRED)

 SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_device_manager")
+SET(BUNDLE_VERSION "0.0.1")
 SET_HEADERS("Bundle-Name: Apache Celix Device Access Device Manager")

 bundle(device_manager SOURCES

Modified: celix/trunk/device_access/device_access/private/src/activator.c
URL:
http://svn.apache.org/viewvc/celix/trunk/device_access/device_access/private/src/activator.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/device_access/device_access/private/src/activator.c
(original)
+++ celix/trunk/device_access/device_access/private/src/activator.c Mon
Sep 29 19:11:55 2014
@@ -186,6 +186,6 @@ celix_status_t bundleActivator_stop(void
celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt
context) {
        celix_status_t status = CELIX_SUCCESS;
        device_manager_bundle_instance_pt bundleData = userData;
-       deviceManager_destroy(bundleData->deviceManager);
-       return CELIX_SUCCESS;
+       status = deviceManager_destroy(bundleData->deviceManager);
+       return status;
 }

Modified:
celix/trunk/device_access/device_access/private/src/device_manager.c
URL:
http://svn.apache.org/viewvc/celix/trunk/device_access/device_access/private/src/device_manager.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/device_access/device_access/private/src/device_manager.c
(original)
+++ celix/trunk/device_access/device_access/private/src/device_manager.c
Mon Sep 29 19:11:55 2014
@@ -264,7 +264,6 @@ celix_status_t deviceManager_matchAttach
properties_pt properties =
NULL;
                                                status =
serviceRegistration_getProperties(registration, &properties);
                                                if (status ==
CELIX_SUCCESS) {
- char *driverId =
properties_get(properties, (char *) OSGI_DEVICEACCESS_DRIVER_ID);

driver_attributes_pt finalAttributes = hashMap_get(manager->drivers,
match->reference);
                                                        if
(finalAttributes == NULL) {
status =
deviceManager_noDriverFound(manager, service, reference);
@@ -406,7 +405,7 @@ celix_status_t deviceManager_driverRemov

                        hash_map_iterator_pt iter =
hashMapIterator_create(manager->drivers);
                        while (hashMapIterator_hasNext(iter)) {
-                               driver_attributes_pt da =
hashMapIterator_nextValue(iter);
+                               //driver_attributes_pt da =
hashMapIterator_nextValue(iter);
                                //driverAttributes_tryUninstall(da);
                        }
                        hashMapIterator_destroy(iter);

Modified: celix/trunk/device_access/driver_locator/CMakeLists.txt
URL:
http://svn.apache.org/viewvc/celix/trunk/device_access/driver_locator/CMakeLists.txt?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/device_access/driver_locator/CMakeLists.txt (original)
+++ celix/trunk/device_access/driver_locator/CMakeLists.txt Mon Sep 29
19:11:55 2014
@@ -18,6 +18,7 @@
 find_package(APR REQUIRED)

 SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_driver_locator")
+SET(BUNDLE_VERSION "0.0.1")
 SET_HEADERS("Bundle-Name: Apache Celix Device Access Driver Locator")

 bundle(driver_locator SOURCES

Modified: celix/trunk/device_access/driver_locator/private/src/activator.c
URL:
http://svn.apache.org/viewvc/celix/trunk/device_access/driver_locator/private/src/activator.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/device_access/driver_locator/private/src/activator.c
(original)
+++ celix/trunk/device_access/driver_locator/private/src/activator.c Mon
Sep 29 19:11:55 2014
@@ -64,7 +64,6 @@ celix_status_t bundleActivator_start(voi
     status = bundleContext_getMemoryPool(context, &pool);
     bundle_instance_pt bi = (bundle_instance_pt)userData;
     if (status == CELIX_SUCCESS) {
- struct activatorData * data = (struct activatorData *) userData;
         bi->service = apr_palloc(pool, sizeof(*(bi->service)));
         bi->service->findDrivers = driverLocator_findDrivers;
         bi->service->loadDriver = driverLocator_loadDriver;

Modified: celix/trunk/device_access/example/base_driver/CMakeLists.txt
URL:
http://svn.apache.org/viewvc/celix/trunk/device_access/example/base_driver/CMakeLists.txt?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/device_access/example/base_driver/CMakeLists.txt (original) +++ celix/trunk/device_access/example/base_driver/CMakeLists.txt Mon Sep
29 19:11:55 2014
@@ -18,6 +18,7 @@
 find_package(APR REQUIRED)

 SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_base_driver_example")
+SET(BUNDLE_VERSION "0.0.1")
SET_HEADERS("Bundle-Name: Apache Celix Device Access Base Driver Example")

 bundle(base_driver SOURCES

Modified: celix/trunk/device_access/example/consuming_driver/CMakeLists.txt
URL:
http://svn.apache.org/viewvc/celix/trunk/device_access/example/consuming_driver/CMakeLists.txt?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/device_access/example/consuming_driver/CMakeLists.txt
(original)
+++ celix/trunk/device_access/example/consuming_driver/CMakeLists.txt Mon
Sep 29 19:11:55 2014
@@ -18,6 +18,7 @@
 find_package(APR REQUIRED)

 SET_HEADER(BUNDLE_SYMBOLICNAME
"apache_celix_word_consuming_driver_example")
+SET(BUNDLE_VERSION "0.0.1")
 SET_HEADERS("Bundle-Name: Apache Celix Device Access Word Consuming
Driver Example")

 bundle(word_consumingdriver SOURCES

Modified:
celix/trunk/device_access/example/consuming_driver/private/src/activator.c
URL:
http://svn.apache.org/viewvc/celix/trunk/device_access/example/consuming_driver/private/src/activator.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
---
celix/trunk/device_access/example/consuming_driver/private/src/activator.c
(original)
+++
celix/trunk/device_access/example/consuming_driver/private/src/activator.c
Mon Sep 29 19:11:55 2014
@@ -105,7 +105,6 @@ celix_status_t bundleActivator_stop(void
celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt
context) {
        printf("CONSUMING_DRIVER: destroying bundle\n");
        celix_status_t status = CELIX_SUCCESS;
-       consuming_driver_bundle_instance_pt bi = userData;
        return status;
 }


Modified:
celix/trunk/device_access/example/consuming_driver/private/src/consuming_driver.c
URL:
http://svn.apache.org/viewvc/celix/trunk/device_access/example/consuming_driver/private/src/consuming_driver.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
---
celix/trunk/device_access/example/consuming_driver/private/src/consuming_driver.c
(original)
+++
celix/trunk/device_access/example/consuming_driver/private/src/consuming_driver.c
Mon Sep 29 19:11:55 2014
@@ -125,7 +125,6 @@ celix_status_t consumingDriver_match(voi
        printf("CONSUMING_DRIVER: match called\n");
        int match=0;
        celix_status_t status = CELIX_SUCCESS;
-       consuming_driver_pt driver = driverHandler;

        service_registration_pt registration = NULL;
        properties_pt properties = NULL;

Modified: celix/trunk/device_access/example/refining_driver/CMakeLists.txt
URL:
http://svn.apache.org/viewvc/celix/trunk/device_access/example/refining_driver/CMakeLists.txt?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/device_access/example/refining_driver/CMakeLists.txt
(original)
+++ celix/trunk/device_access/example/refining_driver/CMakeLists.txt Mon
Sep 29 19:11:55 2014
@@ -18,6 +18,7 @@
 find_package(APR REQUIRED)

 SET_HEADER(BUNDLE_SYMBOLICNAME
"apache_celix_char_refining_driver_example")
+SET(BUNDLE_VERSION "0.0.1")
SET_HEADERS("Bundle-Name: Apache Celix Device Access Char Refining Driver
Example")

 bundle(char_refiningdriver SOURCES

Modified:
celix/trunk/device_access/example/refining_driver/private/src/activator.c
URL:
http://svn.apache.org/viewvc/celix/trunk/device_access/example/refining_driver/private/src/activator.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
---
celix/trunk/device_access/example/refining_driver/private/src/activator.c
(original)
+++
celix/trunk/device_access/example/refining_driver/private/src/activator.c
Mon Sep 29 19:11:55 2014
@@ -105,7 +105,6 @@ celix_status_t bundleActivator_stop(void
celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt
context) {
        printf("REFINING_DRIVER: destroying bundle\n");
        celix_status_t status = CELIX_SUCCESS;
-       refining_driver_bundle_instance_pt bi = userData;
        return status;
 }


Modified:
celix/trunk/device_access/example/refining_driver/private/src/refining_driver.c
URL:
http://svn.apache.org/viewvc/celix/trunk/device_access/example/refining_driver/private/src/refining_driver.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
---
celix/trunk/device_access/example/refining_driver/private/src/refining_driver.c
(original)
+++
celix/trunk/device_access/example/refining_driver/private/src/refining_driver.c
Mon Sep 29 19:11:55 2014
@@ -80,7 +80,7 @@ static apr_status_t refiningDriver_clean
 celix_status_t refiningDriver_create(bundle_context_pt context,
apr_pool_t *pool, refining_driver_pt *driver) {
        celix_status_t status = CELIX_SUCCESS;
        apr_pool_t *driverPool = NULL;
-       apr_status_t aprStatus = apr_pool_create(&driverPool, pool);
+       apr_pool_create(&driverPool, pool);
        (*driver) = apr_palloc(driverPool, sizeof(**driver));
        if ((*driver) != NULL) {
                apr_pool_pre_cleanup_register(driverPool, (*driver),
refiningDriver_cleanup);
@@ -210,7 +210,6 @@ celix_status_t refiningDriver_attach(voi
        celix_status_t status = CELIX_SUCCESS;
        refining_driver_pt driver = driverHandler;
        (*result) = NULL;
-       device_service_pt device = NULL;
        base_driver_device_service_pt device_service = NULL;
        status = bundleContext_getService(driver->context, reference,
(void **)&device_service);
        if (status == CELIX_SUCCESS) {
@@ -230,7 +229,6 @@ celix_status_t refiningDriver_match(void
        printf("REFINING_DRIVER: match called\n");
        int match = 0;
        celix_status_t status = CELIX_SUCCESS;
-       refining_driver_pt driver = driverHandler;

        service_registration_pt registration = NULL;
        properties_pt properties = NULL;

Modified: celix/trunk/event_admin/event_admin/CMakeLists.txt
URL:
http://svn.apache.org/viewvc/celix/trunk/event_admin/event_admin/CMakeLists.txt?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/event_admin/event_admin/CMakeLists.txt (original)
+++ celix/trunk/event_admin/event_admin/CMakeLists.txt Mon Sep 29 19:11:55
2014
@@ -23,6 +23,7 @@ include_directories(private/include)
 #include_directories(../utils/public/include)

 SET_HEADER(BUNDLE_SYMBOLICNAME "eventadmin")
+SET(BUNDLE_VERSION "0.0.1")
 SET_HEADERS("Bundle-Name: Event admin")



Modified:
celix/trunk/event_admin/event_admin/private/include/event_admin_impl.h
URL:
http://svn.apache.org/viewvc/celix/trunk/event_admin/event_admin/private/include/event_admin_impl.h?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/event_admin/event_admin/private/include/event_admin_impl.h
(original)
+++ celix/trunk/event_admin/event_admin/private/include/event_admin_impl.h
Mon Sep 29 19:11:55 2014
@@ -120,7 +120,7 @@ celix_status_t eventAdmin_releaseHanders
  * @param char *topic. String containing the topic
  * @param properties_pt properties.
  */
-celix_status_t eventAdmin_createEvent(event_admin_pt *event_admin, char
*topic, properties_pt properties, event_pt *event);
+celix_status_t eventAdmin_createEvent(event_admin_pt event_admin, char
*topic, properties_pt properties, event_pt *event);
 /**
  * @desc checks if an event contains the property
  * @param event_pt *event. the event to check

Modified:
celix/trunk/event_admin/event_admin/private/src/event_admin_impl.c
URL:
http://svn.apache.org/viewvc/celix/trunk/event_admin/event_admin/private/src/event_admin_impl.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/event_admin/event_admin/private/src/event_admin_impl.c
(original)
+++ celix/trunk/event_admin/event_admin/private/src/event_admin_impl.c Mon
Sep 29 19:11:55 2014
@@ -194,7 +194,7 @@ celix_status_t eventAdmin_releaseHanders
     channel_t channel = hashMap_get(event_admin->channels, topic);
        if (channel != NULL) {
         // TODO check the result value...
-        apr_status_t status =
apr_thread_mutex_unlock(channel->channelLock);
+        apr_thread_mutex_unlock(channel->channelLock);
fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "UNLOCK: %s!", topic);
     }
        return status;
@@ -223,13 +223,11 @@ celix_status_t eventAdmin_addedService(v
 }

 celix_status_t eventAdmin_modifiedService(void * handle,
service_reference_pt ref, void * service) {
-       struct data * data = (struct data *) handle;
fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "Event admin Modified");
        return CELIX_SUCCESS;
 }

 celix_status_t eventAdmin_removedService(void * handle,
service_reference_pt ref, void * service) {
-       struct data * data = (struct data *) handle;
fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "Event admin Removed %p",
service);
        return CELIX_SUCCESS;
 }

Modified: celix/trunk/event_admin/event_admin/private/src/event_impl.c
URL:
http://svn.apache.org/viewvc/celix/trunk/event_admin/event_admin/private/src/event_impl.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/event_admin/event_admin/private/src/event_impl.c (original) +++ celix/trunk/event_admin/event_admin/private/src/event_impl.c Mon Sep
29 19:11:55 2014
@@ -38,13 +38,13 @@ struct event {
        properties_pt properties;
 };

-celix_status_t eventAdmin_createEvent(event_admin_pt *event_admin, char
*topic, properties_pt properties, event_pt *event){
+celix_status_t eventAdmin_createEvent(event_admin_pt event_admin, char
*topic, properties_pt properties, event_pt *event){
        celix_status_t status = CELIX_SUCCESS;

- fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "create event event admin
pointer: %p",(*event_admin));
-       fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "pool create event:
%p",(*event_admin)->pool);
+ fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "create event event admin
pointer: %p",event_admin);
+       fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "pool create event:
%p",event_admin->pool);

-       *event = apr_palloc((*event_admin)->pool,sizeof(**event));
+       *event = apr_palloc(event_admin->pool,sizeof(**event));
        if(!*event){
               status = CELIX_ENOMEM;
               fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "No MEM");

Modified: celix/trunk/event_admin/event_handler/CMakeLists.txt
URL:
http://svn.apache.org/viewvc/celix/trunk/event_admin/event_handler/CMakeLists.txt?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/event_admin/event_handler/CMakeLists.txt (original)
+++ celix/trunk/event_admin/event_handler/CMakeLists.txt Mon Sep 29
19:11:55 2014
@@ -22,6 +22,7 @@ include_directories(private/include)

include_directories(${PROJECT_SOURCE_DIR}/event_admin/event_admin/public/include)

 SET_HEADER(BUNDLE_SYMBOLICNAME "eventhandler")
+SET(BUNDLE_VERSION "0.0.1")
 SET_HEADERS("Bundle-Name: Event Handler")



Modified:
celix/trunk/event_admin/event_handler/private/src/event_handler_impl.c
URL:
http://svn.apache.org/viewvc/celix/trunk/event_admin/event_handler/private/src/event_handler_impl.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/event_admin/event_handler/private/src/event_handler_impl.c
(original)
+++ celix/trunk/event_admin/event_handler/private/src/event_handler_impl.c
Mon Sep 29 19:11:55 2014
@@ -83,7 +83,7 @@ celix_status_t eventHandlerAddedService(
 }

 celix_status_t eventHandlerModifiedService(void * handle,
service_reference_pt ref, void * service) {
-       fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG,"" [SUB] Event admin
modified.");
+       fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "[SUB] Event admin
modified.");
        return CELIX_SUCCESS;
 }


Modified: celix/trunk/event_admin/event_publisher/CMakeLists.txt
URL:
http://svn.apache.org/viewvc/celix/trunk/event_admin/event_publisher/CMakeLists.txt?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/event_admin/event_publisher/CMakeLists.txt (original)
+++ celix/trunk/event_admin/event_publisher/CMakeLists.txt Mon Sep 29
19:11:55 2014
@@ -22,6 +22,7 @@ include_directories(private/include)

include_directories(${PROJECT_SOURCE_DIR}/event_admin/event_admin/public/include)

 SET_HEADER(BUNDLE_SYMBOLICNAME "event_publisher")
+SET(BUNDLE_VERSION "0.0.1")
 SET_HEADERS("Bundle-Name: Event Publisher")



Modified:
celix/trunk/event_admin/event_publisher/private/include/event_publisher_impl.h
URL:
http://svn.apache.org/viewvc/celix/trunk/event_admin/event_publisher/private/include/event_publisher_impl.h?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
---
celix/trunk/event_admin/event_publisher/private/include/event_publisher_impl.h
(original)
+++
celix/trunk/event_admin/event_publisher/private/include/event_publisher_impl.h
Mon Sep 29 19:11:55 2014
@@ -62,12 +62,7 @@ celix_status_t eventPublisherCreate(apr_
  * @param event_publisher_pt *event_publisher the publisher to start
  */
celix_status_t eventPublisherStart(event_publisher_pt *event_publisher);
-/**
- * @desc the thread sending events.
- * @param apr_thread_t *thd a pointer to the thread
- * @param void *handle. Pointer to the event publisher
- */
-static void *APR_THREAD_FUNC eventPublisherSendEventThread(apr_thread_t
*thd, void *handle);
+
 /**
  * @desc functions used by the event admin tracker
  * @param void *handle, pointer to the event publisher

Modified:
celix/trunk/event_admin/event_publisher/private/src/event_publisher_activator.c
URL:
http://svn.apache.org/viewvc/celix/trunk/event_admin/event_publisher/private/src/event_publisher_activator.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
---
celix/trunk/event_admin/event_publisher/private/src/event_publisher_activator.c
(original)
+++
celix/trunk/event_admin/event_publisher/private/src/event_publisher_activator.c
Mon Sep 29 19:11:55 2014
@@ -40,9 +40,9 @@ celix_status_t bundleActivator_create(bu
        celix_status_t status = CELIX_SUCCESS;
        apr_pool_t *pool = NULL;
        apr_pool_t *parentPool;
-       struct activator *activator;
+       struct activator *activator = NULL;
        status = bundleContext_getMemoryPool(context, &parentPool);
-       if( status == CELIX_SUCCESS ) {
+       if(status == CELIX_SUCCESS) {
                if(apr_pool_create(&pool,parentPool) != APR_SUCCESS) {
                        status = CELIX_BUNDLE_EXCEPTION;
                }else {
@@ -51,14 +51,13 @@ celix_status_t bundleActivator_create(bu
                        activator->context = context;
                        *userData = activator;
                }
+               event_publisher_pt eventpublisher;
+        status =
eventPublisherCreate(activator->pool,context,&eventpublisher);
+        if(status == CELIX_SUCCESS) {
+            activator->event_publisher = eventpublisher;
+        }
        }
-       event_publisher_pt eventpublisher;
-       status =
eventPublisherCreate(activator->pool,context,&eventpublisher);
-       if(status == CELIX_SUCCESS) {

-               activator->event_publisher = eventpublisher;
-
-       }
        return status;
 }


Modified:
celix/trunk/event_admin/event_publisher/private/src/event_publisher_impl.c
URL:
http://svn.apache.org/viewvc/celix/trunk/event_admin/event_publisher/private/src/event_publisher_impl.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
---
celix/trunk/event_admin/event_publisher/private/src/event_publisher_impl.c
(original)
+++
celix/trunk/event_admin/event_publisher/private/src/event_publisher_impl.c
Mon Sep 29 19:11:55 2014
@@ -26,6 +26,8 @@

 #include "event_publisher_impl.h"

+static void *APR_THREAD_FUNC eventPublisherSendEventThread(apr_thread_t
*thd, void *handle);
+
celix_status_t eventPublisherCreate(apr_pool_t *pool, bundle_context_pt
context, event_publisher_pt *event_publisher) {
     celix_status_t status = CELIX_SUCCESS;
     *event_publisher = apr_palloc(pool, sizeof(**event_publisher));

Modified: celix/trunk/examples/hello_world_test/private/src/activator.c
URL:
http://svn.apache.org/viewvc/celix/trunk/examples/hello_world_test/private/src/activator.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/examples/hello_world_test/private/src/activator.c
(original)
+++ celix/trunk/examples/hello_world_test/private/src/activator.c Mon Sep
29 19:11:55 2014
@@ -37,7 +37,6 @@ struct userData {
 };

 celix_status_t bundleActivator_create(bundle_context_pt context, void
**userData) {
-       apr_pool_t *pool;
        celix_status_t status = CELIX_SUCCESS;
     *userData = malloc(sizeof(struct userData));
     if (userData != NULL) {

Modified:
celix/trunk/examples/osgi-in-action/chapter01-greeting-example/greeting/private/src/activator.c
URL:
http://svn.apache.org/viewvc/celix/trunk/examples/osgi-in-action/chapter01-greeting-example/greeting/private/src/activator.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
---
celix/trunk/examples/osgi-in-action/chapter01-greeting-example/greeting/private/src/activator.c
(original)
+++
celix/trunk/examples/osgi-in-action/chapter01-greeting-example/greeting/private/src/activator.c
Mon Sep 29 19:11:55 2014
@@ -85,7 +85,7 @@ celix_status_t bundleActivator_stop(void
        greeting_activator_pt act = (greeting_activator_pt) userData;
        serviceRegistration_unregister(act->reg);
        act->reg = NULL;
-       return CELIX_SUCCESS;
+       return status;
 }

celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt
context) {

Modified: celix/trunk/framework/private/mock/attribute_mock.c
URL:
http://svn.apache.org/viewvc/celix/trunk/framework/private/mock/attribute_mock.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/framework/private/mock/attribute_mock.c (original)
+++ celix/trunk/framework/private/mock/attribute_mock.c Mon Sep 29
19:11:55 2014
@@ -35,6 +35,11 @@ celix_status_t attribute_create(char * k
        return mock_c()->returnValue().value.intValue;
 }

+celix_status_t attribute_destroy(attribute_pt attribute) {
+    mock_c()->actualCall("attribute_destroy");
+    return mock_c()->returnValue().value.intValue;
+}
+
 celix_status_t attribute_getKey(attribute_pt attribute, char **key) {
        mock_c()->actualCall("attribute_getKey")
->withPointerParameters("attribute", attribute)

Modified: celix/trunk/framework/private/mock/bundle_context_mock.c
URL:
http://svn.apache.org/viewvc/celix/trunk/framework/private/mock/bundle_context_mock.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/framework/private/mock/bundle_context_mock.c (original) +++ celix/trunk/framework/private/mock/bundle_context_mock.c Mon Sep 29
19:11:55 2014
@@ -120,6 +120,12 @@ celix_status_t bundleContext_getServiceR
        return mock_c()->returnValue().value.intValue;
 }

+celix_status_t bundleContext_ungetServiceReference(bundle_context_pt
context, service_reference_pt reference) {
+    mock_c()->actualCall("bundleContext_ungetServiceReference")
+            ->withPointerParameters("context", context)
+            ->withPointerParameters("reference", reference);
+    return mock_c()->returnValue().value.intValue;
+}

 celix_status_t bundleContext_getService(bundle_context_pt context,
service_reference_pt reference, void **service_instance) {
        mock_c()->actualCall("bundleContext_getService")

Modified: celix/trunk/framework/private/mock/framework_mock.c
URL:
http://svn.apache.org/viewvc/celix/trunk/framework/private/mock/framework_mock.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/framework/private/mock/framework_mock.c (original)
+++ celix/trunk/framework/private/mock/framework_mock.c Mon Sep 29
19:11:55 2014
@@ -147,6 +147,14 @@ celix_status_t fw_getServiceReferences(f
                return mock_c()->returnValue().value.intValue;
 }

+celix_status_t framework_ungetServiceReference(framework_pt framework,
bundle_pt bundle, service_reference_pt reference) {
+    mock_c()->actualCall("framework_ungetServiceReference")
+        ->withPointerParameters("framework", framework)
+        ->withPointerParameters("bundle", bundle)
+        ->withPointerParameters("reference", reference);
+    return mock_c()->returnValue().value.intValue;
+}
+
celix_status_t fw_getService(framework_pt framework, bundle_pt bundle,
service_reference_pt reference, void **service) {
        mock_c()->actualCall("fw_getService")
                ->withPointerParameters("framework", framework)

Modified: celix/trunk/framework/private/src/bundle_archive.c
URL:
http://svn.apache.org/viewvc/celix/trunk/framework/private/src/bundle_archive.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/framework/private/src/bundle_archive.c (original)
+++ celix/trunk/framework/private/src/bundle_archive.c Mon Sep 29 19:11:55
2014
@@ -168,7 +168,6 @@ celix_status_t bundleArchive_destroy(bun

 celix_status_t bundleArchive_recreate(char * archiveRoot,
bundle_archive_pt *bundle_archive) {
     celix_status_t status = CELIX_SUCCESS;
-    char *errpr = NULL;

     bundle_archive_pt archive;


Modified: celix/trunk/framework/private/src/framework.c
URL:
http://svn.apache.org/viewvc/celix/trunk/framework/private/src/framework.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/framework/private/src/framework.c (original)
+++ celix/trunk/framework/private/src/framework.c Mon Sep 29 19:11:55 2014
@@ -227,10 +227,8 @@ celix_status_t framework_destroy(framewo
        if(framework->installedBundleMap!=NULL){
        hash_map_iterator_pt iterator =
hashMapIterator_create(framework->installedBundleMap);
        while (hashMapIterator_hasNext(iterator)) {
-               linked_list_pt wires;
hash_map_entry_pt entry = hashMapIterator_nextEntry(iterator);
                bundle_pt bundle = (bundle_pt)
hashMapEntry_getValue(entry);
-               char *location = (char *) hashMapEntry_getKey(entry);
                bundle_archive_pt archive = NULL;

if (bundle_getArchive(bundle, &archive) == CELIX_SUCCESS) {
@@ -795,8 +793,6 @@ celix_status_t fw_stopBundle(framework_p
        bundle_state_e state;
     activator_pt activator = NULL;
     bundle_context_pt context = NULL;
-    module_pt module = NULL;
-    manifest_pt manifest = NULL;
     bool wasActive = false;
     long id = 0;
     char *error = NULL;
@@ -908,7 +904,6 @@ celix_status_t fw_stopBundle(framework_p

 celix_status_t fw_uninstallBundle(framework_pt framework, bundle_pt
bundle) {
     celix_status_t status = CELIX_SUCCESS;
-    bundle_state_e state;
     bool locked;
     bundle_archive_pt archive = NULL;
     char * location;
@@ -1363,7 +1358,7 @@ void fw_addServiceListener(framework_pt
                array_list_pt infos = NULL;
                bool ungetResult = false;

-               celix_status_t status = fw_getService(framework,
framework->bundle, ref, (void **) &hook);
+ fw_getService(framework, framework->bundle, ref, (void **)
&hook);

                arrayList_create(&infos);
                arrayList_add(infos, info);
@@ -1425,7 +1420,7 @@ void fw_removeServiceListener(framework_
                        array_list_pt infos = NULL;
                        bool ungetResult;

- celix_status_t status = fw_getService(framework,
framework->bundle, ref, (void **) &hook);
+ fw_getService(framework, framework->bundle, ref,
(void **) &hook);

                        arrayList_create(&infos);
                        arrayList_add(infos, info);
@@ -2132,7 +2127,7 @@ static void *fw_eventDispatcher(void *fw

                size = arrayList_size(framework->requests);
                while (size == 0 && !framework->shutdown) {
-                       celix_status_t status =
celixThreadCondition_wait(&framework->dispatcher,
&framework->dispatcherLock);
+ celixThreadCondition_wait(&framework->dispatcher,
&framework->dispatcherLock);
                        // Ignore status and just keep waiting
                        size = arrayList_size(framework->requests);
                }
@@ -2258,17 +2253,6 @@ static celix_status_t framework_loadBund
     bundle_revision_pt revision = NULL;
     manifest_pt manifest = NULL;

-    #ifdef __linux__
-             char * library_prefix = "lib";
-             char * library_extension = ".so";
-    #elif __APPLE__
-             char * library_prefix = "lib";
-             char * library_extension = ".dylib";
-    #elif WIN32
-             char * library_prefix = "";
-             char * library_extension = ".dll";
-    #endif
-
status = CELIX_DO_IF(status, bundle_getArchive(bundle, &archive));
     status = CELIX_DO_IF(status,
bundleArchive_getCurrentRevision(archive, &revision));
     status = CELIX_DO_IF(status, bundleRevision_getManifest(revision,
&manifest));
@@ -2367,9 +2351,9 @@ static celix_status_t framework_loadLibr
     #endif

     char libraryPath[256];
-    long refreshCount;
-    char *archiveRoot;
-    long revisionNumber;
+    long refreshCount = 0;
+    char *archiveRoot = NULL;
+    long revisionNumber = 0;

status = CELIX_DO_IF(status, bundleArchive_getRefreshCount(archive,
&refreshCount));
status = CELIX_DO_IF(status, bundleArchive_getArchiveRoot(archive,
&archiveRoot));
@@ -2379,7 +2363,6 @@ static celix_status_t framework_loadLibr

     *handle = fw_openLibrary(libraryPath);
     if (*handle == NULL) {
-        char err[1024];
         error = fw_getLastError();
         // #TODO this is wrong
         status =  CELIX_BUNDLE_EXCEPTION;

Modified: celix/trunk/framework/private/src/manifest.c
URL:
http://svn.apache.org/viewvc/celix/trunk/framework/private/src/manifest.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/framework/private/src/manifest.c (original)
+++ celix/trunk/framework/private/src/manifest.c Mon Sep 29 19:11:55 2014
@@ -218,7 +218,6 @@ celix_status_t manifest_readAttributes(m
                }

                if (lbuf[0] == ' ') {
-                       int newlen = strlen(lastLine) + len;
                        char buf[512];
                        buf[0] = '\0';


Modified: celix/trunk/framework/private/src/properties.c
URL:
http://svn.apache.org/viewvc/celix/trunk/framework/private/src/properties.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/framework/private/src/properties.c (original)
+++ celix/trunk/framework/private/src/properties.c Mon Sep 29 19:11:55 2014
@@ -55,7 +55,6 @@ properties_pt properties_load(char *file
        char value[1024];
        bool precedingCharIsBackslash = false;
        bool isComment = false;
-       int valueStart = 0;
        int linePos = 0;
        int outputPos = 0;
        char *output = NULL;
@@ -141,7 +140,6 @@ properties_pt properties_load(char *file
  */
void properties_store(properties_pt properties, char * filename, char *
header) {
        FILE *file = fopen ( filename, "w+" );
-       int i;
        char *str;

        if (file != NULL) {

Modified: celix/trunk/framework/private/src/resolver.c
URL:
http://svn.apache.org/viewvc/celix/trunk/framework/private/src/resolver.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/framework/private/src/resolver.c (original)
+++ celix/trunk/framework/private/src/resolver.c Mon Sep 29 19:11:55 2014
@@ -74,7 +74,6 @@ linked_list_pt resolver_resolve(module_p
                hash_map_iterator_pt iter =
hashMapIterator_create(candidatesMap);
                while (hashMapIterator_hasNext(iter)) {
                        hash_map_entry_pt entry =
hashMapIterator_nextEntry(iter);
-                       module_pt key = hashMapEntry_getKey(entry);
                        linked_list_pt value =
hashMapEntry_getValue(entry);
                        hashMapIterator_remove(iter);
                        if (value != NULL) {
@@ -94,13 +93,11 @@ linked_list_pt resolver_resolve(module_p
                return NULL;
        }

-       bundle_pt bundle = module_getBundle(root);
        linkedList_create(&wireMap);
resolved = resolver_populateWireMap(candidatesMap, root, wireMap);
        iter = hashMapIterator_create(candidatesMap);
        while (hashMapIterator_hasNext(iter)) {
hash_map_entry_pt entry = hashMapIterator_nextEntry(iter);
-               module_pt key = hashMapEntry_getKey(entry);
                linked_list_pt value = hashMapEntry_getValue(entry);
                hashMapIterator_remove(iter);
                if (value != NULL) {
@@ -211,7 +208,6 @@ void resolver_removeInvalidCandidate(mod

        for (iterator = hashMapIterator_create(candidates);
hashMapIterator_hasNext(iterator); ) {
                hash_map_entry_pt entry =
hashMapIterator_nextEntry(iterator);
- module_pt module = (module_pt) hashMapEntry_getKey(entry);
                linked_list_pt candSetList = (linked_list_pt)
hashMapEntry_getValue(entry);
                if (candSetList != NULL) {
                        linked_list_iterator_pt itCandSetList;
@@ -391,7 +387,6 @@ 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;
-    linked_list_pt emptyWires;
        bundle_pt bundle = NULL;
        bool resolved = false;


Modified: celix/trunk/framework/private/src/service_tracker.c
URL:
http://svn.apache.org/viewvc/celix/trunk/framework/private/src/service_tracker.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/framework/private/src/service_tracker.c (original)
+++ celix/trunk/framework/private/src/service_tracker.c Mon Sep 29
19:11:55 2014
@@ -156,7 +156,6 @@ service_reference_pt serviceTracker_getS
 array_list_pt serviceTracker_getServiceReferences(service_tracker_pt
tracker) {
        tracked_pt tracked;
        unsigned int i;
-       int size = arrayList_size(tracker->tracked);
        array_list_pt references = NULL;
        arrayList_create(&references);

@@ -180,7 +179,6 @@ void *serviceTracker_getService(service_
array_list_pt serviceTracker_getServices(service_tracker_pt tracker) {
        tracked_pt tracked;
        unsigned int i;
-       int size = arrayList_size(tracker->tracked);
        array_list_pt references = NULL;
        arrayList_create(&references);


Modified: celix/trunk/log_service/private/src/log_factory.c
URL:
http://svn.apache.org/viewvc/celix/trunk/log_service/private/src/log_factory.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/log_service/private/src/log_factory.c (original)
+++ celix/trunk/log_service/private/src/log_factory.c Mon Sep 29 19:11:55
2014
@@ -76,6 +76,5 @@ celix_status_t logFactory_getService(voi
 }

celix_status_t logFactory_ungetService(void *factory, bundle_pt bundle,
service_registration_pt registration) {
-    log_service_factory_pt log_factory = ((service_factory_pt)
factory)->factory;
     return CELIX_SUCCESS;
 }

Modified: celix/trunk/log_writer/log_writer/private/src/log_writer.c
URL:
http://svn.apache.org/viewvc/celix/trunk/log_writer/log_writer/private/src/log_writer.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/log_writer/log_writer/private/src/log_writer.c (original) +++ celix/trunk/log_writer/log_writer/private/src/log_writer.c Mon Sep 29
19:11:55 2014
@@ -92,7 +92,6 @@ celix_status_t logWriter_addedServ(void
 }

celix_status_t logWriter_modifiedServ(void * handle, service_reference_pt
ref, void * service) {
-       log_writer_pt writer = (log_writer_pt) handle;
        return CELIX_SUCCESS;
 }


Modified:
celix/trunk/log_writer/log_writer_syslog/private/src/log_writer_syslog.c
URL:
http://svn.apache.org/viewvc/celix/trunk/log_writer/log_writer_syslog/private/src/log_writer_syslog.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
---
celix/trunk/log_writer/log_writer_syslog/private/src/log_writer_syslog.c
(original)
+++
celix/trunk/log_writer/log_writer_syslog/private/src/log_writer_syslog.c
Mon Sep 29 19:11:55 2014
@@ -49,8 +49,6 @@ celix_status_t logListener_logged(log_li
                if (status == CELIX_SUCCESS) {

                        int sysLogLvl = -1;
-                       int strLen_message = 0;
-                       char* sysLog_message = NULL;

                        switch(entry->level)
                        {
@@ -71,13 +69,7 @@ celix_status_t logListener_logged(log_li
                                        break;
                        }

-                       strLen_message = strlen(sName) +
strlen(entry->message) + 6;//"[]: (\n)" -> 6
-                       sysLog_message = calloc(strLen_message,
sizeof(char));
- snprintf(sysLog_message, strLen_message, "[%s]:
%s", sName, entry->message);
-
-                       syslog(sysLogLvl, sysLog_message);
-
-                       free(sysLog_message);
+                       syslog(sysLogLvl, "[%s]: %s", sName,
entry->message);
                }
     }


Modified:
celix/trunk/remote_services/calculator_service/private/src/calculator_activator.c
URL:
http://svn.apache.org/viewvc/celix/trunk/remote_services/calculator_service/private/src/calculator_activator.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
---
celix/trunk/remote_services/calculator_service/private/src/calculator_activator.c
(original)
+++
celix/trunk/remote_services/calculator_service/private/src/calculator_activator.c
Mon Sep 29 19:11:55 2014
@@ -98,9 +98,6 @@ celix_status_t bundleActivator_stop(void

celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt
context) {
        celix_status_t status = CELIX_SUCCESS;
-       struct activator *activator = userData;
-
-

        return status;
 }

Modified:
celix/trunk/remote_services/calculator_shell/private/src/add_command.c
URL:
http://svn.apache.org/viewvc/celix/trunk/remote_services/calculator_shell/private/src/add_command.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/remote_services/calculator_shell/private/src/add_command.c
(original)
+++ celix/trunk/remote_services/calculator_shell/private/src/add_command.c
Mon Sep 29 19:11:55 2014
@@ -63,7 +63,7 @@ void addCommand_execute(command_pt comma
status = bundleContext_getServiceReference(command->bundleContext,
(char *) CALCULATOR_SERVICE, &calculatorService);
     if (status == CELIX_SUCCESS) {
        char *token;
-               char *commandStr = apr_strtok(line, " ", &token);
+               apr_strtok(line, " ", &token);
                char *aStr = apr_strtok(NULL, " ", &token);
                bool numeric;
                addCommand_isNumeric(command, aStr, &numeric);
@@ -95,9 +95,6 @@ void addCommand_execute(command_pt comma
                        out("ADD: Requires 2 numerical parameter\n");
                        status = CELIX_ILLEGAL_ARGUMENT;
                }
-
-        double a;
-        double b;
     } else {
         out("No calc service available\n");
     }

Modified:
celix/trunk/remote_services/calculator_shell/private/src/sqrt_command.c
URL:
http://svn.apache.org/viewvc/celix/trunk/remote_services/calculator_shell/private/src/sqrt_command.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
---
celix/trunk/remote_services/calculator_shell/private/src/sqrt_command.c
(original)
+++
celix/trunk/remote_services/calculator_shell/private/src/sqrt_command.c Mon
Sep 29 19:11:55 2014
@@ -59,13 +59,11 @@ void sqrtCommand_destroy(command_pt comm
void sqrtCommand_execute(command_pt command, char *line, void (*out)(char
*), void (*err)(char *)) {
        celix_status_t status = CELIX_SUCCESS;
     service_reference_pt calculatorService = NULL;
-    apr_pool_t *memory_pool = NULL;
-    apr_pool_t *bundle_memory_pool = NULL;

status = bundleContext_getServiceReference(command->bundleContext,
(char *) CALCULATOR_SERVICE, &calculatorService);
     if (status == CELIX_SUCCESS) {
        char *token;
-               char *commandStr = apr_strtok(line, " ", &token);
+               apr_strtok(line, " ", &token);
                char *aStr = apr_strtok(NULL, " ", &token);
                bool numeric;
                sqrtCommand_isNumeric(command, aStr, &numeric);
@@ -90,9 +88,6 @@ void sqrtCommand_execute(command_pt comm
                        out("SQRT: Requires 1 numerical parameter\n");
                        status = CELIX_ILLEGAL_ARGUMENT;
                }
-
-        double a;
-        double b;
     } else {
         out("No calc service available\n");
     }

Modified:
celix/trunk/remote_services/calculator_shell/private/src/sub_command.c
URL:
http://svn.apache.org/viewvc/celix/trunk/remote_services/calculator_shell/private/src/sub_command.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/remote_services/calculator_shell/private/src/sub_command.c
(original)
+++ celix/trunk/remote_services/calculator_shell/private/src/sub_command.c
Mon Sep 29 19:11:55 2014
@@ -59,13 +59,11 @@ void subCommand_destroy(command_pt comma
void subCommand_execute(command_pt command, char *line, void (*out)(char
*), void (*err)(char *)) {
        celix_status_t status = CELIX_SUCCESS;
     service_reference_pt calculatorService = NULL;
-    apr_pool_t *memory_pool = NULL;
-    apr_pool_t *bundle_memory_pool = NULL;

status = bundleContext_getServiceReference(command->bundleContext,
(char *) CALCULATOR_SERVICE, &calculatorService);
     if (status == CELIX_SUCCESS) {
        char *token;
-               char *commandStr = apr_strtok(line, " ", &token);
+               apr_strtok(line, " ", &token);
                char *aStr = apr_strtok(NULL, " ", &token);
                bool numeric;
                subCommand_isNumeric(command, aStr, &numeric);
@@ -97,9 +95,6 @@ void subCommand_execute(command_pt comma
                        out("SUB: Requires 2 numerical parameter\n");
                        status = CELIX_ILLEGAL_ARGUMENT;
                }
-
-        double a;
-        double b;
     } else {
         out("No calc service available\n");
     }

Modified:
celix/trunk/remote_services/discovery/private/include/endpoint_descriptor_common.h
URL:
http://svn.apache.org/viewvc/celix/trunk/remote_services/discovery/private/include/endpoint_descriptor_common.h?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
---
celix/trunk/remote_services/discovery/private/include/endpoint_descriptor_common.h
(original)
+++
celix/trunk/remote_services/discovery/private/include/endpoint_descriptor_common.h
Mon Sep 29 19:11:55 2014
@@ -43,10 +43,6 @@ typedef enum {
     VALUE_TYPE_SHORT,
 } valueType;

-
-static valueType valueTypeFromString(char *name);
-static char* valueTypeToString(valueType type);
-
 static const xmlChar* XML = (const xmlChar*) "xml";
 static const xmlChar* XMLNS = (const xmlChar*) "
http://www.osgi.org/xmlns/rsa/v1.0.0";;


Modified: celix/trunk/remote_services/discovery/private/src/discovery.c
URL:
http://svn.apache.org/viewvc/celix/trunk/remote_services/discovery/private/src/discovery.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/remote_services/discovery/private/src/discovery.c
(original)
+++ celix/trunk/remote_services/discovery/private/src/discovery.c Mon Sep
29 19:11:55 2014
@@ -129,7 +129,6 @@ celix_status_t discovery_endpointListene

 celix_status_t discovery_endpointListenerModified(void * handle,
service_reference_pt reference, void * service) {
        celix_status_t status = CELIX_SUCCESS;
-       discovery_pt discovery = handle;

        status = discovery_endpointListenerRemoved(handle, reference,
service);
        status = discovery_endpointListenerAdded(handle, reference,
service);

Modified:
celix/trunk/remote_services/discovery/private/src/endpoint_descriptor_reader.c
URL:
http://svn.apache.org/viewvc/celix/trunk/remote_services/discovery/private/src/endpoint_descriptor_reader.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
---
celix/trunk/remote_services/discovery/private/src/endpoint_descriptor_reader.c
(original)
+++
celix/trunk/remote_services/discovery/private/src/endpoint_descriptor_reader.c
Mon Sep 29 19:11:55 2014
@@ -42,6 +42,8 @@ struct endpoint_descriptor_reader {
     xmlTextReaderPtr reader;
 };

+static valueType valueTypeFromString(char *name);
+
 celix_status_t
endpointDescriptorReader_create(endpoint_descriptor_reader_pt *reader) {
     celix_status_t status = CELIX_SUCCESS;

@@ -104,7 +106,6 @@ celix_status_t endpointDescriptorReader_
         valueType propertyType = VALUE_TYPE_STRING;
         xmlChar *valueBuffer = xmlMalloc(256);
         valueBuffer[0] = '\0';
-        unsigned int currentSize = 255;

         array_list_pt propertyValues = NULL;
         arrayList_create(&propertyValues);

Modified:
celix/trunk/remote_services/discovery/private/src/endpoint_descriptor_writer.c
URL:
http://svn.apache.org/viewvc/celix/trunk/remote_services/discovery/private/src/endpoint_descriptor_writer.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
---
celix/trunk/remote_services/discovery/private/src/endpoint_descriptor_writer.c
(original)
+++
celix/trunk/remote_services/discovery/private/src/endpoint_descriptor_writer.c
Mon Sep 29 19:11:55 2014
@@ -42,6 +42,8 @@ struct endpoint_descriptor_writer {

 static celix_status_t
endpointDescriptorWriter_writeEndpoint(endpoint_descriptor_writer_pt
writer, endpoint_description_pt endpoint);

+static char* valueTypeToString(valueType type);
+
 celix_status_t
endpointDescriptorWriter_create(endpoint_descriptor_writer_pt *writer) {
     celix_status_t status = CELIX_SUCCESS;


Modified:
celix/trunk/remote_services/discovery/private/src/endpoint_discovery_poller.c
URL:
http://svn.apache.org/viewvc/celix/trunk/remote_services/discovery/private/src/endpoint_discovery_poller.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
---
celix/trunk/remote_services/discovery/private/src/endpoint_discovery_poller.c
(original)
+++
celix/trunk/remote_services/discovery/private/src/endpoint_discovery_poller.c
Mon Sep 29 19:11:55 2014
@@ -197,7 +197,6 @@ celix_status_t endpointDiscoveryPoller_r

 static void *endpointDiscoveryPoller_poll(void *data) {
endpoint_discovery_poller_pt poller = (endpoint_discovery_poller_pt)
data;
-    discovery_pt discovery = poller->discovery;

     useconds_t interval = poller->poll_interval * 1000000L;

@@ -280,8 +279,8 @@ static size_t endpointDiscoveryPoller_wr
 static celix_status_t
endpointDiscoveryPoller_getEndpoints(endpoint_discovery_poller_pt poller,
char *url, array_list_pt *updatedEndpoints) {
     celix_status_t status = CELIX_SUCCESS;

-    CURL *curl;
-    CURLcode res;
+    CURL *curl = NULL;
+    CURLcode res = 0;

     struct MemoryStruct chunk;
     chunk.memory = malloc(1);

Modified:
celix/trunk/remote_services/discovery_bonjour/private/src/discovery.c
URL:
http://svn.apache.org/viewvc/celix/trunk/remote_services/discovery_bonjour/private/src/discovery.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/remote_services/discovery_bonjour/private/src/discovery.c
(original)
+++ celix/trunk/remote_services/discovery_bonjour/private/src/discovery.c
Mon Sep 29 19:11:55 2014
@@ -350,7 +350,6 @@ celix_status_t discovery_endpointListene

 celix_status_t discovery_endpointListenerModified(void * handle,
service_reference_pt reference, void * service) {
        celix_status_t status = CELIX_SUCCESS;
-       discovery_pt discovery = handle;

        return status;
 }
@@ -386,7 +385,6 @@ static void discovery_browseCallback(DNS
uint32_t interfaceIndex, DNSServiceErrorType errorCode, const char *serviceName, const char *regtype, const char
*replyDomain,
                void *context) {
-       discovery_pt discovery = context;
        if (flags & kDNSServiceFlagsAdd) {
                fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "Added service
with %s %s %s.", serviceName, regtype,
                                replyDomain);

Modified:
celix/trunk/remote_services/discovery_configured/private/src/discovery_impl.c
URL:
http://svn.apache.org/viewvc/celix/trunk/remote_services/discovery_configured/private/src/discovery_impl.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
---
celix/trunk/remote_services/discovery_configured/private/src/discovery_impl.c
(original)
+++
celix/trunk/remote_services/discovery_configured/private/src/discovery_impl.c
Mon Sep 29 19:11:55 2014
@@ -119,7 +119,6 @@ celix_status_t discovery_stop(discovery_

 celix_status_t discovery_destroy(discovery_pt discovery) {
        celix_status_t status = CELIX_SUCCESS;
-       hash_map_iterator_pt iter;

        discovery->context = NULL;
        discovery->poller = NULL;

Modified:
celix/trunk/remote_services/discovery_etcd/private/src/discovery_impl.c
URL:
http://svn.apache.org/viewvc/celix/trunk/remote_services/discovery_etcd/private/src/discovery_impl.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
---
celix/trunk/remote_services/discovery_etcd/private/src/discovery_impl.c
(original)
+++
celix/trunk/remote_services/discovery_etcd/private/src/discovery_impl.c Mon
Sep 29 19:11:55 2014
@@ -75,7 +75,6 @@ celix_status_t discovery_create(bundle_c

 celix_status_t discovery_destroy(discovery_pt discovery) {
        celix_status_t status = CELIX_SUCCESS;
-       hash_map_iterator_pt iter;

        discovery->context = NULL;
        discovery->poller = NULL;

Modified: celix/trunk/remote_services/discovery_etcd/private/src/etcd.c
URL:
http://svn.apache.org/viewvc/celix/trunk/remote_services/discovery_etcd/private/src/etcd.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/remote_services/discovery_etcd/private/src/etcd.c
(original)
+++ celix/trunk/remote_services/discovery_etcd/private/src/etcd.c Mon Sep
29 19:11:55 2014
@@ -125,7 +125,6 @@ bool etcd_getNodes(char* directory, char
        json_t* js_root;
        json_t* js_node;
        json_t* js_nodes;
-       json_t* js_value;
        json_error_t error;
        int res;
        struct MemoryStruct reply;
@@ -224,7 +223,6 @@ bool etcd_del(char* key) {
        json_error_t error;
        json_t* js_root;
        json_t* js_node;
-       json_t* js_value;
        bool retVal = false;
        char url[MAX_URL_LENGTH];
        char request[MAX_CONTENT_LENGTH];
@@ -266,7 +264,6 @@ bool etcd_watch(char* key, int index, ch
        json_t* js_prevValue;
        bool retVal = false;
        char url[MAX_URL_LENGTH];
-       char request[MAX_CONTENT_LENGTH];
        int res;
        struct MemoryStruct reply;


Modified: celix/trunk/remote_services/discovery_shm/CMakeLists.txt
URL:
http://svn.apache.org/viewvc/celix/trunk/remote_services/discovery_shm/CMakeLists.txt?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/remote_services/discovery_shm/CMakeLists.txt (original) +++ celix/trunk/remote_services/discovery_shm/CMakeLists.txt Mon Sep 29
19:11:55 2014
@@ -26,6 +26,7 @@ if (RSA_BUNDLES_DISCOVERY_SHM)
        include_directories("private/include")

SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_rsa_discovery_shm")
+       SET(BUNDLE_VERSION "0.0.1")
        SET_HEADERS("Bundle-Name: Apache Celix RSA Discovery SHM")

        bundle(discovery_shm SOURCES

Modified: celix/trunk/remote_services/discovery_shm/private/src/discovery.c
URL:
http://svn.apache.org/viewvc/celix/trunk/remote_services/discovery_shm/private/src/discovery.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/remote_services/discovery_shm/private/src/discovery.c
(original)
+++ celix/trunk/remote_services/discovery_shm/private/src/discovery.c Mon
Sep 29 19:11:55 2014
@@ -855,7 +855,6 @@ celix_status_t discovery_stopOrDetachShm
        }
        else
        {
-               int listener = 0;
                ipc_shmData_pt shmData = (ipc_shmData_pt)
discovery->shmBaseAdress;

                discovery_lock(shmData->semId, 0);

Modified:
celix/trunk/remote_services/discovery_shm/private/src/discovery_activator.c
URL:
http://svn.apache.org/viewvc/celix/trunk/remote_services/discovery_shm/private/src/discovery_activator.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
---
celix/trunk/remote_services/discovery_shm/private/src/discovery_activator.c
(original)
+++
celix/trunk/remote_services/discovery_shm/private/src/discovery_activator.c
Mon Sep 29 19:11:55 2014
@@ -131,8 +131,6 @@ celix_status_t bundleActivator_stop(void
 }

celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt
context) {
-       celix_status_t status = CELIX_SUCCESS;
-
        struct activator *activator = userData;
        if(activator==NULL || (activator->discovery)==NULL){
                return CELIX_BUNDLE_EXCEPTION;

Modified: celix/trunk/remote_services/discovery_slp/private/src/discovery.c
URL:
http://svn.apache.org/viewvc/celix/trunk/remote_services/discovery_slp/private/src/discovery.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/remote_services/discovery_slp/private/src/discovery.c
(original)
+++ celix/trunk/remote_services/discovery_slp/private/src/discovery.c Mon
Sep 29 19:11:55 2014
@@ -296,7 +296,6 @@ celix_status_t discovery_endpointRemoved

        discovery_pt discovery = handle;
        SLPError err;
-       SLPError callbackerr;
        SLPHandle slp;
        char *serviceUrl = NULL;

@@ -377,7 +376,6 @@ celix_status_t discovery_updateEndpointL
        hash_map_iterator_pt iter =
hashMapIterator_create(discovery->slpServices);
        while (hashMapIterator_hasNext(iter)) {
hash_map_entry_pt entry = hashMapIterator_nextEntry(iter);
-               char *key = hashMapEntry_getKey(entry);
                endpoint_description_pt value =
hashMapEntry_getValue(entry);
                discovery_informListener(discovery, service, value);
        }
@@ -404,8 +402,7 @@ static void *APR_THREAD_FUNC discovery_p
        err = SLPOpen("en", SLP_FALSE, &slp);

        while (discovery->running) {
-               SLPError err = SLP_TRUE;
-               SLPError callbackerr;
+               SLPError err = SLP_OK;
                arrayList_clear(discovery->handled);
                while (err == SLP_TRUE) {
                        err = SLPFindSrvs(slp, "osgi.remote", 0, 0,
discovery_pollSLPCallback, data);
@@ -456,9 +453,9 @@ SLPBoolean discovery_pollSLPCallback(SLP

                                SLPHandle handle = NULL;
SLPError err = SLPOpen("en", SLP_FALSE,
&handle);
-                               err = SLP_TRUE;
+                               err = SLP_OK;
                                slp_service_pt slpService =
apr_palloc(discovery->pool, sizeof(*slpService));
-                               while (err == SLP_TRUE) {
+                               while (err == SLP_OK) {
err = SLPFindAttrs(handle, srvurl,
"", "", discovery_attributesCallback, slpService);
                                }


Modified:
celix/trunk/remote_services/remote_service_admin_http/private/src/export_registration_impl.c
URL:
http://svn.apache.org/viewvc/celix/trunk/remote_services/remote_service_admin_http/private/src/export_registration_impl.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
---
celix/trunk/remote_services/remote_service_admin_http/private/src/export_registration_impl.c
(original)
+++
celix/trunk/remote_services/remote_service_admin_http/private/src/export_registration_impl.c
Mon Sep 29 19:11:55 2014
@@ -146,7 +146,6 @@ celix_status_t exportRegistration_endpoi

 celix_status_t exportRegistration_endpointModified(void * handle,
service_reference_pt reference, void *service) {
        celix_status_t status = CELIX_SUCCESS;
-       export_registration_pt registration = handle;

        return status;
 }

Modified:
celix/trunk/remote_services/remote_service_admin_http/private/src/import_registration_impl.c
URL:
http://svn.apache.org/viewvc/celix/trunk/remote_services/remote_service_admin_http/private/src/import_registration_impl.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
---
celix/trunk/remote_services/remote_service_admin_http/private/src/import_registration_impl.c
(original)
+++
celix/trunk/remote_services/remote_service_admin_http/private/src/import_registration_impl.c
Mon Sep 29 19:11:55 2014
@@ -190,14 +190,12 @@ celix_status_t importRegistration_proxyF

 celix_status_t importRegistration_proxyFactoryModified(void * handle,
service_reference_pt reference, void *service) {
        celix_status_t status = CELIX_SUCCESS;
-       import_registration_factory_pt registration_factory =
(import_registration_factory_pt) handle;

        return status;
 }

 celix_status_t importRegistration_proxyFactoryRemoved(void * handle,
service_reference_pt reference, void *service) {
        celix_status_t status = CELIX_SUCCESS;
-       import_registration_pt registration = handle;

        import_registration_factory_pt registration_factory =
(import_registration_factory_pt) handle;
        registration_factory->trackedFactory = NULL;

Modified:
celix/trunk/remote_services/remote_service_admin_http/private/src/remote_service_admin_activator.c
URL:
http://svn.apache.org/viewvc/celix/trunk/remote_services/remote_service_admin_http/private/src/remote_service_admin_activator.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
---
celix/trunk/remote_services/remote_service_admin_http/private/src/remote_service_admin_activator.c
(original)
+++
celix/trunk/remote_services/remote_service_admin_http/private/src/remote_service_admin_activator.c
Mon Sep 29 19:11:55 2014
@@ -116,7 +116,6 @@ celix_status_t bundleActivator_stop(void

celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt
context) {
        celix_status_t status = CELIX_SUCCESS;
-       struct activator *activator = userData;
        return status;
 }


Modified:
celix/trunk/remote_services/remote_service_admin_http/private/src/remote_service_admin_impl.c
URL:
http://svn.apache.org/viewvc/celix/trunk/remote_services/remote_service_admin_http/private/src/remote_service_admin_impl.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
---
celix/trunk/remote_services/remote_service_admin_http/private/src/remote_service_admin_impl.c
(original)
+++
celix/trunk/remote_services/remote_service_admin_http/private/src/remote_service_admin_impl.c
Mon Sep 29 19:11:55 2014
@@ -164,9 +164,7 @@ static int remoteServiceAdmin_callback(s
                        const char *uri = request_info->uri;
                        // rest = myservice/call
                        const char *rest = uri+9;
-                       int length = strlen(rest);
                        char *interfaceStart = strchr(rest, '/');
- char *callStart = strchr(interfaceStart+1, '/');
                        int pos = interfaceStart - rest;
                        char service[pos+1];
                        strncpy(service, rest, pos);
@@ -319,7 +317,7 @@ celix_status_t remoteServiceAdmin_remove
     printf("Remote export %p\n", registration->reference);
     registrations = hashMap_remove(admin->exportedServices,
registration->reference);

-    return CELIX_SUCCESS;
+    return status;
 }

celix_status_t remoteServiceAdmin_installEndpoint(remote_service_admin_pt admin, export_registration_pt registration, service_reference_pt reference,
char *interface) {

Modified:
celix/trunk/remote_services/remote_service_admin_shm/CMakeLists.txt
URL:
http://svn.apache.org/viewvc/celix/trunk/remote_services/remote_service_admin_shm/CMakeLists.txt?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/remote_services/remote_service_admin_shm/CMakeLists.txt
(original)
+++ celix/trunk/remote_services/remote_service_admin_shm/CMakeLists.txt
Mon Sep 29 19:11:55 2014
@@ -29,6 +29,7 @@ if (RSA_BUNDLES_REMOTE_SERVICE_ADMIN_SHM

include_directories("${PROJECT_SOURCE_DIR}/remote_services/endpoint_listener/public/include")

        SET_HEADER(BUNDLE_SYMBOLICNAME
"apache_celix_remote_service_admin_shm")
+       SET(BUNDLE_VERSION "0.0.1")
SET_HEADERS("Bundle-Name: Apache Celix Remote Service Admin SHM")

        bundle(remote_service_admin_shm SOURCES

Modified:
celix/trunk/remote_services/topology_manager/private/src/topology_manager.c
URL:
http://svn.apache.org/viewvc/celix/trunk/remote_services/topology_manager/private/src/topology_manager.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
---
celix/trunk/remote_services/topology_manager/private/src/topology_manager.c
(original)
+++
celix/trunk/remote_services/topology_manager/private/src/topology_manager.c
Mon Sep 29 19:11:55 2014
@@ -150,7 +150,6 @@ celix_status_t topologyManager_rsaAdded(

 celix_status_t topologyManager_rsaModified(void * handle,
service_reference_pt reference, void * service) {
        celix_status_t status = CELIX_SUCCESS;
-       topology_manager_pt manager = handle;

        // Nop...

@@ -225,7 +224,6 @@ celix_status_t topologyManager_serviceCh

        properties_pt props = NULL;
        serviceRegistration_getProperties(registration, &props);
-       char *name = properties_get(props, (char *)
OSGI_FRAMEWORK_OBJECTCLASS);
        char *export = properties_get(props, (char *)
OSGI_RSA_SERVICE_EXPORTED_INTERFACES);
        char *serviceId = properties_get(props, (char
*)OSGI_FRAMEWORK_SERVICE_ID);


Modified: celix/trunk/remote_shell/CMakeLists.txt
URL:
http://svn.apache.org/viewvc/celix/trunk/remote_shell/CMakeLists.txt?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/remote_shell/CMakeLists.txt (original)
+++ celix/trunk/remote_shell/CMakeLists.txt Mon Sep 29 19:11:55 2014
@@ -18,6 +18,7 @@ celix_subproject(REMOTE_SHELL "Option to
 if (REMOTE_SHELL)

        SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_remote_shell")
+       SET(BUNDLE_VERSION "0.0.1")
        SET_HEADERS("Bundle-Name: Apache Celix Remote Shell")

     bundle(remote_shell SOURCES

Modified: celix/trunk/shell/private/src/inspect_command.c
URL:
http://svn.apache.org/viewvc/celix/trunk/shell/private/src/inspect_command.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/shell/private/src/inspect_command.c (original)
+++ celix/trunk/shell/private/src/inspect_command.c Mon Sep 29 19:11:55
2014
@@ -63,7 +63,7 @@ void inspectCommand_execute(command_pt c
        celix_status_t status = CELIX_SUCCESS;
        char outString[256];
        char *token;
-       char *commandStr = strtok_r(commandline, " ", &token);
+       strtok_r(commandline, " ", &token);
        char *type = strtok_r(NULL, " ", &token);
        if (type != NULL) {
                char *direction = strtok_r(NULL, " ", &token);
@@ -115,7 +115,7 @@ celix_status_t inspectCommand_printExpor
        array_list_pt bundles = NULL;

        if (arrayList_isEmpty(ids)) {
-               celix_status_t status =
bundleContext_getBundles(command->bundleContext, &bundles);
+ status = bundleContext_getBundles(command->bundleContext,
&bundles);
        } else {
                unsigned int i;

@@ -168,7 +168,6 @@ celix_status_t inspectCommand_printExpor

service_registration_pt reg = NULL;

properties_pt props = NULL;

char line[256];
-
 char *objectClass = NULL;


serviceReference_getServiceRegistration(ref, &reg);

@@ -204,7 +203,7 @@ celix_status_t inspectCommand_printImpor
     array_list_pt bundles = NULL;

     if (arrayList_isEmpty(ids)) {
-        celix_status_t status =
bundleContext_getBundles(command->bundleContext, &bundles);
+        status = bundleContext_getBundles(command->bundleContext,
&bundles);
     } else {
         unsigned int i;


Modified: celix/trunk/shell/private/src/log_command.c
URL:
http://svn.apache.org/viewvc/celix/trunk/shell/private/src/log_command.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/shell/private/src/log_command.c (original)
+++ celix/trunk/shell/private/src/log_command.c Mon Sep 29 19:11:55 2014
@@ -52,7 +52,6 @@ void logCommand_destroy(command_pt comma

void logCommand_execute(command_pt command, char *line, void (*out)(char
*), void (*err)(char *)) {
     service_reference_pt readerService = NULL;
-    service_reference_pt logService = NULL;
     apr_pool_t *memory_pool = NULL;

bundleContext_getServiceReference(command->bundleContext, (char *)
OSGI_LOGSERVICE_READER_SERVICE_NAME, &readerService);

Modified: celix/trunk/shell/private/src/update_command.c
URL:
http://svn.apache.org/viewvc/celix/trunk/shell/private/src/update_command.c?rev=1628261&r1=1628260&r2=1628261&view=diff

==============================================================================
--- celix/trunk/shell/private/src/update_command.c (original)
+++ celix/trunk/shell/private/src/update_command.c Mon Sep 29 19:11:55 2014
@@ -96,24 +96,27 @@ void updateCommand_execute(command_pt co
 }

 celix_status_t updateCommand_download(command_pt command, char * url,
char **inputFile) {
-       CURL *curl;
-       CURLcode res;
+       CURL *curl = NULL;
+       CURLcode res = 0;
        curl = curl_easy_init();
        if (curl) {
                FILE *fp = NULL;
-               tmpnam(*inputFile);
-               printf("Temp file: %s\n", *inputFile);
-               fp = fopen(*inputFile, "wb+");
-               curl_easy_setopt(curl, CURLOPT_URL, url);
-               curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,
updateCommand_writeData);
-               curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
-               //curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);
-               //curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION,
updateCommand_downloadProgress);
-               res = curl_easy_perform(curl);
-               printf("Error: %d\n", res);
-               /* always cleanup */
-               curl_easy_cleanup(curl);
-               fclose(fp);
+               *inputFile = "updateXXXXXX";
+               int fd = mkstemp(*inputFile);
+               if (fd) {
+                   fp = fopen(*inputFile, "wb+");
+            printf("Temp file: %s\n", *inputFile);
+            curl_easy_setopt(curl, CURLOPT_URL, url);
+            curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,
updateCommand_writeData);
+            curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
+            //curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);
+            //curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION,
updateCommand_downloadProgress);
+            res = curl_easy_perform(curl);
+            printf("Error: %d\n", res);
+            /* always cleanup */
+            curl_easy_cleanup(curl);
+            fclose(fp);
+               }
        }
        if (res != CURLE_OK) {
                *inputFile[0] = '\0';



Reply via email to