From a8aed11cf0441604e0240f48867745a06fd37805 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Mon, 22 Jun 2015 13:13:05 +0200 Subject: [PATCH] platform: fix build on 32-bit systems The decimal literals are signed by default and these are too large to fit in a signed 32-bit int. (cherry picked from commit a1868dcfc3b640d3273c450d790befc8632edc3a) --- src/platform/nmp-object.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/platform/nmp-object.c b/src/platform/nmp-object.c index 5893ce0e31..9977e84250 100644 --- a/src/platform/nmp-object.c +++ b/src/platform/nmp-object.c @@ -674,7 +674,7 @@ _vt_cmd_plobj_id_hash (link, NMPlatformLink, { /* libnl considers: * .oo_id_attrs = LINK_ATTR_IFINDEX | LINK_ATTR_FAMILY, */ - hash = (guint) 3982791431; + hash = (guint) 3982791431u; hash = hash + ((guint) obj->ifindex); }) _vt_cmd_plobj_id_hash (ip4_address, NMPlatformIP4Address, { @@ -682,13 +682,13 @@ _vt_cmd_plobj_id_hash (ip4_address, NMPlatformIP4Address, { * .oo_id_attrs = (ADDR_ATTR_FAMILY | ADDR_ATTR_IFINDEX | * ADDR_ATTR_LOCAL | ADDR_ATTR_PREFIXLEN), */ - hash = (guint) 3591309853; + hash = (guint) 3591309853u; hash = hash + ((guint) obj->ifindex); hash = hash * 33 + ((guint) obj->plen); hash = hash * 33 + ((guint) obj->address); }) _vt_cmd_plobj_id_hash (ip6_address, NMPlatformIP6Address, { - hash = (guint) 2907861637; + hash = (guint) 2907861637u; hash = hash + ((guint) obj->ifindex); hash = hash * 33 + ((guint) obj->plen); hash = hash * 33 + _id_hash_ip6_addr (&obj->address); @@ -699,14 +699,14 @@ _vt_cmd_plobj_id_hash (ip4_route, NMPlatformIP4Route, { * ROUTE_ATTR_TABLE | ROUTE_ATTR_DST | * ROUTE_ATTR_PRIO), */ - hash = (guint) 2569857221; + hash = (guint) 2569857221u; hash = hash + ((guint) obj->ifindex); hash = hash * 33 + ((guint) obj->plen); hash = hash * 33 + ((guint) obj->metric); hash = hash * 33 + ((guint) obj->network); }) _vt_cmd_plobj_id_hash (ip6_route, NMPlatformIP6Route, { - hash = (guint) 3999787007; + hash = (guint) 3999787007u; hash = hash + ((guint) obj->ifindex); hash = hash * 33 + ((guint) obj->plen); hash = hash * 33 + ((guint) obj->metric);