mirror of
https://github.com/espressif/openthread.git
synced 2026-07-30 07:37:46 +00:00
[windows] fix warnings (#3435)
This commit is contained in:
@@ -151,7 +151,11 @@ void platformAlarmUpdateTimeout(struct timeval *aTimeout)
|
||||
remaining = 1;
|
||||
}
|
||||
|
||||
aTimeout->tv_sec = (time_t)remaining / US_PER_S;
|
||||
#ifndef _WIN32
|
||||
aTimeout->tv_sec = (time_t)remaining / US_PER_S;
|
||||
#else
|
||||
aTimeout->tv_sec = (long)remaining / US_PER_S;
|
||||
#endif
|
||||
aTimeout->tv_usec = remaining % US_PER_S;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
#include <WinSock2.h>
|
||||
#include <windows.h>
|
||||
#define POLL WSAPoll
|
||||
#define ssize_t int
|
||||
#define ssize_t long
|
||||
#include <time.h>
|
||||
#define localtime _localtime32
|
||||
// In user mode, define some Linux functions
|
||||
|
||||
@@ -446,7 +446,11 @@ void platformRadioInit(void)
|
||||
|
||||
void platformRadioDeinit(void)
|
||||
{
|
||||
#ifndef _WIN32
|
||||
close(sSockFd);
|
||||
#else
|
||||
closesocket(sSockFd);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool otPlatRadioIsEnabled(otInstance *aInstance)
|
||||
@@ -841,7 +845,7 @@ void otPlatRadioEnableSrcMatch(otInstance *aInstance, bool aEnable)
|
||||
sSrcMatchEnabled = aEnable;
|
||||
}
|
||||
|
||||
otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress)
|
||||
otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
|
||||
@@ -881,7 +885,7 @@ exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress)
|
||||
otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
|
||||
|
||||
@@ -671,7 +671,7 @@ void otPlatRadioEnableSrcMatch(otInstance *aInstance, bool aEnable)
|
||||
sSrcMatchEnabled = aEnable;
|
||||
}
|
||||
|
||||
otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress)
|
||||
otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
|
||||
@@ -711,7 +711,7 @@ exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, const uint16_t aShortAddress)
|
||||
otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user