diff options
author | Li Xiaoming <lixm.fnst@cn.fujitsu.com> | 2019-09-04 13:52:55 +0800 |
---|---|---|
committer | Li Xiaoming <lixm.fnst@cn.fujitsu.com> | 2019-09-04 13:52:55 +0800 |
commit | 42dae33e054afb0da85d4376f8ae66bb4867cf99 (patch) | |
tree | 22a28a507c4090e4fe29f6d2832a911a3ea20d30 /binding | |
parent | be559c923aa00ffcb2e1347607616c6a8c862ab5 (diff) |
fix(network-util.c): Remove -Woverflow warning
agl-service-network/binding/network-util.c:160:14: warning: integer
overflow in expression ‘-2147483648’ of type ‘long int’ results in
‘-2147483648’ [-Woverflow]
if (i64 >= -(1L << 31) && i64 < (1L << 31))
Bug-AGL: SPEC-2422
Change-Id: I3bdc78527b1fff44917561ea49dcfefa7a4d83a2
Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
Diffstat (limited to 'binding')
-rw-r--r-- | binding/network-util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/binding/network-util.c b/binding/network-util.c index 0dab808..3bb1b99 100644 --- a/binding/network-util.c +++ b/binding/network-util.c @@ -157,7 +157,7 @@ json_object *simple_gvariant_to_json(GVariant *var, json_object *parent, break; case G_VARIANT_CLASS_INT64: i64 = g_variant_get_int64(var); - if (i64 >= -(1L << 31) && i64 < (1L << 31)) + if (i64 >= -(1LL << 31) && i64 < (1LL << 31)) obj = json_object_new_int((int)i64); else obj = json_object_new_int64(i64); |