Skip to content

Commit

Permalink
Enable -Wconversion in openiotsdk platform code.
Browse files Browse the repository at this point in the history
  • Loading branch information
bzbarsky-apple committed Mar 1, 2023
1 parent e434c6a commit 5c3a35e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/platform/openiotsdk/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,6 @@ static_library("openiotsdk") {
"KVBlockDeviceStore.h",
]
}

cflags = [ "-Wconversion" ]
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ NetworkIterator * OpenIoTSDKEthernetDriver::GetNetworks()
char buf[NETIF_NAMESIZE];
char * ifname = netif_index_to_name(0, buf);

ret->interfaceNameLen = strlen(ifname);
ret->interfaceNameLen = static_cast<uint8_t>(strlen(ifname));
memcpy(ret->interfaceName, ifname, ret->interfaceNameLen);

return ret;
Expand Down

0 comments on commit 5c3a35e

Please sign in to comment.