aboutsummaryrefslogtreecommitdiffstats
path: root/lib/src/compat.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/compat.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/compat.c')
-rw-r--r--lib/src/compat.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/src/compat.c b/lib/src/compat.c
index fba826ab0..23683ff8e 100644
--- a/lib/src/compat.c
+++ b/lib/src/compat.c
@@ -199,7 +199,7 @@ hicn_packet_get_payload_length (hicn_format_t format, const hicn_header_t * h,
int
hicn_packet_set_payload_length (hicn_format_t format, hicn_header_t * h,
- size_t payload_length)
+ const size_t payload_length)
{
hicn_type_t type = hicn_format_to_type (format);
return hicn_ops_vft[type.l1]->set_payload_length (type, &h->protocol,
@@ -504,10 +504,10 @@ hicn_packet_get_reserved_bits (const hicn_header_t * h, u8 * reserved_bits)
switch (HICN_IP_VERSION (h))
{
case 6:
- *reserved_bits = h->v6.tcp.reserved;
+ *reserved_bits = (u8)(h->v6.tcp.reserved);
break;
case 4:
- *reserved_bits = h->v4.tcp.reserved;
+ *reserved_bits = (u8)(h->v4.tcp.reserved);
break;
default:
return HICN_LIB_ERROR_UNEXPECTED;
@@ -517,7 +517,7 @@ hicn_packet_get_reserved_bits (const hicn_header_t * h, u8 * reserved_bits)
}
int
-hicn_packet_set_reserved_bits (hicn_header_t * h, u8 reserved_bits)
+hicn_packet_set_reserved_bits (hicn_header_t * h, const u8 reserved_bits)
{
switch (HICN_IP_VERSION (h))
{
@@ -1011,7 +1011,7 @@ int
hicn_interest_set_payload (hicn_format_t format, hicn_header_t * interest,
const u8 * payload, size_t payload_length)
{
- return hicn_packet_set_payload (format, interest, payload, payload_length);
+ return hicn_packet_set_payload (format, interest, payload, (u16)payload_length);
}
int
@@ -1122,7 +1122,7 @@ int
hicn_data_set_payload (hicn_format_t format, hicn_header_t * data,
const u8 * payload, size_t payload_length)
{
- return hicn_packet_set_payload (format, data, payload, payload_length);
+ return hicn_packet_set_payload (format, data, payload, (u16)payload_length);
}
int