From 2f393c13c25e9ecc51ca889a3c2b84d10402a590 Mon Sep 17 00:00:00 2001 From: skarg Date: Sun, 1 Jan 2017 05:22:17 +0000 Subject: [PATCH] Added cast to fix compiler warning. --- bacnet-stack/src/timesync.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bacnet-stack/src/timesync.c b/bacnet-stack/src/timesync.c index 2c7e2c83..32b9e212 100644 --- a/bacnet-stack/src/timesync.c +++ b/bacnet-stack/src/timesync.c @@ -154,7 +154,7 @@ int timesync_encode_timesync_recipients( /* CHOICE - device [0] BACnetObjectIdentifier */ len = encode_context_object_id(&apdu[apdu_len], 0, - pRecipient->type.device.type, + (int)pRecipient->type.device.type, pRecipient->type.device.instance); apdu_len += len; } else { @@ -162,9 +162,10 @@ int timesync_encode_timesync_recipients( } } else if (pRecipient->tag == 1) { if (pRecipient->type.address.net) { - len = 1 + 3 + 2 + pRecipient->type.address.len + 1; + len = (int)(1 + 3 + 2 + pRecipient->type.address.len + 1); } else { - len = 1 + 3 + 2 + pRecipient->type.address.mac_len + 1; + len = + (int)(1 + 3 + 2 + pRecipient->type.address.mac_len + 1); } if (max_apdu >= (unsigned)len) { /* CHOICE - address [1] BACnetAddress - opening */