From 54b01df89c90946d82cb7522f8d155f2c22cf210 Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Mon, 3 May 2021 22:50:55 -0700 Subject: [PATCH] [router-advertisement] fix implicit conversion loss (#6559) --- src/core/border_router/router_advertisement.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/border_router/router_advertisement.hpp b/src/core/border_router/router_advertisement.hpp index 1ac271e5c..11335f10a 100644 --- a/src/core/border_router/router_advertisement.hpp +++ b/src/core/border_router/router_advertisement.hpp @@ -112,7 +112,7 @@ public: * @param[in] aSize The size of the option in unit of 1 byte. * */ - void SetSize(uint16_t aSize) { mLength = (aSize + kLengthUnit - 1) / kLengthUnit; } + void SetSize(uint16_t aSize) { mLength = static_cast((aSize + kLengthUnit - 1) / kLengthUnit); } /** * This method returns the size of the option (in bytes).