This is an automated email from the ASF dual-hosted git repository. pengzheng pushed a commit to branch feature/574-scope-based-resource-management in repository https://gitbox.apache.org/repos/asf/celix.git
commit bb05cae7ba37cc598ac4cc5ab65b2335dbbb67a7 Author: PengZheng <[email protected]> AuthorDate: Mon Jul 31 14:49:04 2023 +0800 Replace __attribute__((__unused__)) with CELIX_UNUSED. --- .../remote_service_admin_shm_v2/shm_pool/include/shm_pool.h | 4 ++-- bundles/shell/shell/src/c_shell_activator.c | 3 ++- libs/framework/include/celix_bundle_context.h | 2 +- libs/framework/include_deprecated/bundle_context.h | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bundles/remote_services/remote_service_admin_shm_v2/shm_pool/include/shm_pool.h b/bundles/remote_services/remote_service_admin_shm_v2/shm_pool/include/shm_pool.h index ef53c04c..d89f963b 100644 --- a/bundles/remote_services/remote_service_admin_shm_v2/shm_pool/include/shm_pool.h +++ b/bundles/remote_services/remote_service_admin_shm_v2/shm_pool/include/shm_pool.h @@ -90,14 +90,14 @@ typedef struct celix_shm_pool_alloc { shm_pool_t* pool; } celix_shm_pool_alloc_t; -static __attribute__((__unused__)) inline celix_shm_pool_alloc_t celix_shmPool_malloc(shm_pool_t *pool, size_t size) { +static CELIX_UNUSED inline celix_shm_pool_alloc_t celix_shmPool_malloc(shm_pool_t *pool, size_t size) { return (celix_shm_pool_alloc_t) { .ptr = shmPool_malloc(pool, size), .pool = pool }; } -static __attribute__((__unused__)) inline void celix_shmPool_free(celix_shm_pool_alloc_t* alloc) { +static CELIX_UNUSED inline void celix_shmPool_free(celix_shm_pool_alloc_t* alloc) { shmPool_free(alloc->pool, alloc->ptr); } diff --git a/bundles/shell/shell/src/c_shell_activator.c b/bundles/shell/shell/src/c_shell_activator.c index aa448432..eaae2aaf 100644 --- a/bundles/shell/shell/src/c_shell_activator.c +++ b/bundles/shell/shell/src/c_shell_activator.c @@ -24,6 +24,7 @@ #include "shell_private.h" #include "celix_bundle_activator.h" #include "std_commands.h" +#include "celix_compiler.h" #include "celix_constants.h" #include "celix_shell_command.h" #include "std_commands.h" @@ -144,7 +145,7 @@ celix_status_t celix_bundleActivator_stop(void *activatorData, celix_bundle_cont return status; } -celix_status_t celix_bundleActivator_destroy(void *activatorData, celix_bundle_context_t* __attribute__((__unused__)) ctx) { +celix_status_t celix_bundleActivator_destroy(void *activatorData, celix_bundle_context_t* ctx CELIX_UNUSED) { celix_status_t status = CELIX_SUCCESS; shell_bundle_activator_t* activator = activatorData; diff --git a/libs/framework/include/celix_bundle_context.h b/libs/framework/include/celix_bundle_context.h index 26e13e10..8f568c9d 100644 --- a/libs/framework/include/celix_bundle_context.h +++ b/libs/framework/include/celix_bundle_context.h @@ -279,7 +279,7 @@ typedef struct celix_service_reg { long svcId; } celix_service_reg_t; -static __attribute__((__unused__)) inline void celix_service_unregister(celix_service_reg_t* reg) { +static CELIX_UNUSED inline void celix_service_unregister(celix_service_reg_t* reg) { if (reg->svcId >= 0) { celix_bundleContext_unregisterService(reg->ctx, reg->svcId); } diff --git a/libs/framework/include_deprecated/bundle_context.h b/libs/framework/include_deprecated/bundle_context.h index 7b139295..866e9914 100644 --- a/libs/framework/include_deprecated/bundle_context.h +++ b/libs/framework/include_deprecated/bundle_context.h @@ -126,7 +126,7 @@ typedef struct celix_service_ref { } celix_service_ref_t; -static __attribute__((__unused__)) inline void celix_ServiceRef_put(celix_service_ref_t* ref) { +static CELIX_UNUSED inline void celix_ServiceRef_put(celix_service_ref_t* ref) { if (ref->reference != NULL) { bundleContext_ungetServiceReference(ref->context, ref->reference); }
