Fix parameter type 36/279036/1
authorChanggyu Choi <changyu.choi@samsung.com>
Mon, 1 Aug 2022 00:35:12 +0000 (09:35 +0900)
committerChanggyu Choi <changyu.choi@samsung.com>
Mon, 1 Aug 2022 00:40:38 +0000 (09:40 +0900)
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 <changyu.choi@samsung.com>
idlc/gen/c_group_body_gen_cb.h
idlc/gen/cpp_group_body_gen_cb.h

index b40a67e..f27f2b4 100644 (file)
@@ -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;
 
index 3526914..cd0cccc 100644 (file)
@@ -110,14 +110,15 @@ bundle* <CLS_NAME>::GetBundleFromParcel(rpc_port_parcel_h p, bundle* b) {
 
 rpc_port_parcel_h <CLS_NAME>::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<unsigned int>(size));
   if (ret != RPC_PORT_ERROR_NONE)
     return nullptr;