aboutsummaryrefslogtreecommitdiffstats
path: root/lib/src/name.c
diff options
context:
space:
mode:
authorAngelo Mantellini <manangel@cisco.com>2019-02-08 15:11:57 +0100
committerAngelo Mantellini <manangel@cisco.com>2019-02-12 10:53:54 +0100
commitf126f86da5acf088f24e97ecb32f9ba5a1789aa4 (patch)
treeb81704d6048117cbe15a398a3f6f5d974d143d14 /lib/src/name.c
parent3447d02974947d10440e4aa5627318c29be95c01 (diff)
[HICN-44] Remove warnings libhicn (lib) on windows
Change-Id: I637e9c1e05de8a9e6743ea729b62d3eedd6ca54b Signed-off-by: Angelo Mantellini <manangel@cisco.com>
Diffstat (limited to 'lib/src/name.c')
-rw-r--r--lib/src/name.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/src/name.c b/lib/src/name.c
index 9e409bd3b..ba5ff85b5 100644
--- a/lib/src/name.c
+++ b/lib/src/name.c
@@ -97,7 +97,7 @@ hicn_name_create_from_ip_address (const ip_address_t * ip_address, u32 id,
return HICN_LIB_ERROR_INVALID_IP_ADDRESS;
}
- name->len = ip_address->prefix_len;
+ name->len = (u8) (ip_address->prefix_len);
if ((name->type != HNT_CONTIGUOUS_V4) && (name->type != HNT_CONTIGUOUS_V6))
{
return HICN_LIB_ERROR_NOT_IMPLEMENTED;
@@ -493,7 +493,7 @@ hicn_name_ntop (const hicn_name_t * src, char *dst, size_t len)
goto ERR;
}
- offset = strlen (dst);
+ offset = (int) strlen (dst);
dst[offset] = '|';
sprintf (dst + offset + 1, "%lu", (unsigned long) (*(u32 *) seg_number));
@@ -546,7 +546,7 @@ hicn_prefix_create_from_ip_address (const ip_address_t * ip_address,
default:
return HICN_LIB_ERROR_INVALID_IP_ADDRESS;
}
- prefix->len = ip_address->prefix_len;
+ prefix->len = (u8) (ip_address->prefix_len);
return HICN_LIB_ERROR_NONE;
}