diff options
author | Li, Xiaoming <lixm.fnst@cn.fujitsu.com> | 2020-09-14 10:48:06 +0800 |
---|---|---|
committer | Li, Xiaoming <lixm.fnst@cn.fujitsu.com> | 2020-09-14 10:48:06 +0800 |
commit | fa9d1210cdfff25403fb1d234d561444d7d47656 (patch) | |
tree | c7410a60159899072a249985210e1b8a7bbaf865 | |
parent | 761a6fcaa5f92b5fb5e702457bf1941f4d0d54b8 (diff) |
Fix build warning of -Wconversion
log:
[ 22%] Building C object binding/CMakeFiles/afm-bluetooth-binding.dir/bluetooth-api.c.o
/home/devel/xds-workspace/app/agl-service-bluetooth/binding/bluetooth-api.c: In function ‘bluetooth_get_adapters_count’:
/home/devel/xds-workspace/app/agl-service-bluetooth/binding/bluetooth-api.c:540:9: warning: conversion from ‘size_t’ {aka ‘long unsigned int’} to ‘int’ may change value [-Wconversion]
return count;
^~~~~
Change-Id: I05263a24322e928d5cd5dfdddec68372eeff3e62
Signed-off-by: Li, Xiaoming <lixm.fnst@cn.fujitsu.com>
-rw-r--r-- | binding/bluetooth-api.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/binding/bluetooth-api.c b/binding/bluetooth-api.c index 6484b18..c731c34 100644 --- a/binding/bluetooth-api.c +++ b/binding/bluetooth-api.c @@ -534,7 +534,7 @@ static int bluetooth_get_adapters_count(struct init_data *id) count = -EIO; } else { json_object_object_get_ex(jresp, "adapters", &jobj); - count = json_object_array_length(jobj); + count = (int)json_object_array_length(jobj); json_object_put(jresp); } return count; |