summaryrefslogtreecommitdiffstats
path: root/binding/bluetooth-util.c
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2019-06-17 13:04:06 -0700
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2019-06-20 09:43:58 +0000
commitf2f5d6d9079506f31cf64fbd99697ba6f99b429e (patch)
tree7966c8dafbd9d7579a97e592b727c8420091c1dd /binding/bluetooth-util.c
parente3ef5052d65cc158235fbb5d8053d9b1d7731d51 (diff)
binding: bluetooth: fix conversion compiler warnings
Remove follow warnings by switching from int to size_t warning: conversion from ‘size_t’ {aka ‘long unsigned int’} to ‘int’ may change value [-Wconversion] Bug-AGL: SPEC-2535 Change-Id: I28330f92097adc6aa03480078d168d37a60fc051 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding/bluetooth-util.c')
-rw-r--r--binding/bluetooth-util.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/binding/bluetooth-util.c b/binding/bluetooth-util.c
index f07e5ed..a70de5d 100644
--- a/binding/bluetooth-util.c
+++ b/binding/bluetooth-util.c
@@ -68,7 +68,8 @@ int str2boolean(const char *value)
json_object *json_object_copy(json_object *jval)
{
json_object *jobj;
- int i, len;
+ size_t len;
+ int i;
/* handle NULL */
if (!jval)
@@ -682,7 +683,8 @@ GVariant *property_json_to_gvariant(
double d;
const char *jvalstr, *str;
char c;
- int i, len;
+ size_t len;
+ int i;
gboolean is_config;
if (!fmt)
@@ -922,7 +924,8 @@ GVariant *property_json_to_gvariant(
json_object *get_property_collect(json_object *jreqprop, json_object *jprop,
GError **error)
{
- int i, len;
+ size_t len;
+ int i;
json_object *jkey, *jval, *jobj = NULL, *jobjval;
const char *key;
@@ -1067,7 +1070,7 @@ gchar *return_bluez_path(afb_req_t request) {
gchar **json_array_to_strv(json_object *jobj)
{
- int len = json_object_array_length(jobj);
+ size_t len = json_object_array_length(jobj);
gchar **val = g_malloc0(sizeof(gchar *) * (len + 1));
int i;