From 4c0fba48ed5492feae76f8353ea7f61c0c61a073 Mon Sep 17 00:00:00 2001 From: Changgyu Choi Date: Mon, 1 Aug 2022 09:35:12 +0900 Subject: [PATCH] Fix parameter type The size prameter of bundle_get_byte() is size_t type. So this patch changes type of size parameter to size_t. Change-Id: I42d36d7bec06e5a6eb363e8dcdf1b12039444f62 Signed-off-by: Changgyu Choi --- idlc/gen/c_group_body_gen_cb.h | 4 ++-- idlc/gen/cpp_group_body_gen_cb.h | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/idlc/gen/c_group_body_gen_cb.h b/idlc/gen/c_group_body_gen_cb.h index b40a67e..f27f2b4 100644 --- a/idlc/gen/c_group_body_gen_cb.h +++ b/idlc/gen/c_group_body_gen_cb.h @@ -128,14 +128,14 @@ R"__c_cb( static rpc_port_parcel_h __get_parcel_from_bundle(bundle *b) { void *raw = nullptr; - unsigned int size = 0; + size_t size = 0; rpc_port_parcel_h p; int ret = bundle_get_byte(b, "TIDL_RAW", &raw, &size); if (ret != BUNDLE_ERROR_NONE) return nullptr; - ret = rpc_port_parcel_create_from_raw(&p, raw, size); + ret = rpc_port_parcel_create_from_raw(&p, raw, (unsigned int)size); if (ret != RPC_PORT_ERROR_NONE) return nullptr; diff --git a/idlc/gen/cpp_group_body_gen_cb.h b/idlc/gen/cpp_group_body_gen_cb.h index 3526914..cd0cccc 100644 --- a/idlc/gen/cpp_group_body_gen_cb.h +++ b/idlc/gen/cpp_group_body_gen_cb.h @@ -110,14 +110,15 @@ bundle* ::GetBundleFromParcel(rpc_port_parcel_h p, bundle* b) { rpc_port_parcel_h ::GetParcelFromBundle(bundle* b) { void* raw = nullptr; - unsigned int size = 0; + size_t size = 0; rpc_port_parcel_h p; int ret = bundle_get_byte(b, "TIDL_RAW", &raw, &size); if (ret != BUNDLE_ERROR_NONE) return nullptr; - ret = rpc_port_parcel_create_from_raw(&p, raw, size); + ret = rpc_port_parcel_create_from_raw(&p, raw, + static_cast(size)); if (ret != RPC_PORT_ERROR_NONE) return nullptr; -- 2.7.4