Fix Warnings in Windows Build (#1518)

* Fix WinRT function overloading

* Default Spinel Struct parameter
This commit is contained in:
Nick Banks
2017-03-28 09:20:13 -07:00
committed by Jonathan Hui
parent a4ccc9a7ee
commit 303d0ba0ad
3 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -161,9 +161,9 @@ void MainPage::ShowInterfaceDetails(otAdapter^ adapter)
{
try
{
InterfaceMacAddress->Text = otApi::ToString(adapter->ExtendedAddress);
InterfaceMacAddress->Text = otApi::MacToString(adapter->ExtendedAddress);
InterfaceML_EID->Text = adapter->MeshLocalEid->ToString();
InterfaceRLOC->Text = otApi::ToString(adapter->Rloc16);
InterfaceRLOC->Text = otApi::Rloc16ToString(adapter->Rloc16);
if (adapter->State > otThreadState::Child)
{
@@ -259,7 +259,7 @@ void MainPage::AddAdapterToList(otAdapter^ adapter)
[=]() {
GUID interfaceGuid = adapter->InterfaceGuid;
auto state = adapter->State;
auto stateStr = otApi::ToString(adapter->State);
auto stateStr = otApi::ThreadStateToString(adapter->State);
WCHAR szText[256] = { 0 };
swprintf_s(szText, 256, GUID_FORMAT L"\r\n\t%s\r\n\t%s",
+3 -3
View File
@@ -152,7 +152,7 @@ public:
}
// Helper function to convert mac address to string
static String^ ToString(uint64_t mac)
static String^ MacToString(uint64_t mac)
{
WCHAR szMac[64] = { 0 };
swprintf_s(szMac, 64, MAC8_FORMAT, MAC8_ARG(((UCHAR*)&mac)));
@@ -160,7 +160,7 @@ public:
}
// Helper function to convert RLOC16/PANID to string
static String^ ToString(uint16_t rloc)
static String^ Rloc16ToString(uint16_t rloc)
{
WCHAR szRloc[16] = { 0 };
swprintf_s(szRloc, 16, L"0x%X", rloc);
@@ -168,7 +168,7 @@ public:
}
// Helper function to convert state to string
static String^ ToString(otThreadState state)
static String^ ThreadStateToString(otThreadState state)
{
switch (state)
{
+2 -2
View File
@@ -691,10 +691,10 @@ void NcpBase::HandleRawFrame(const RadioPacket *aFrame)
SPINEL_DATATYPE_INT8_S
SPINEL_DATATYPE_UINT16_S
SPINEL_DATATYPE_STRUCT_S( // PHY-data
// Empty for now
"" // Empty for now
)
SPINEL_DATATYPE_STRUCT_S( // Vendor-data
// Empty for now
"" // Empty for now
),
aFrame->mPower, // TX Power
-128, // Noise Floor (Currently unused)