mirror of
https://github.com/espressif/openthread.git
synced 2026-10-14 03:37:40 +00:00
[instance] fix strict-aliasing warning for gcc6 (#2361)
This commit is contained in:
@@ -93,7 +93,9 @@ exit:
|
|||||||
|
|
||||||
Instance &Instance::Get(void)
|
Instance &Instance::Get(void)
|
||||||
{
|
{
|
||||||
return *reinterpret_cast<Instance *>(&sInstanceRaw);
|
void *instance = &sInstanceRaw;
|
||||||
|
|
||||||
|
return *static_cast<Instance *>(instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // #if !OPENTHREAD_ENABLE_MULTIPLE_INSTANCES
|
#else // #if !OPENTHREAD_ENABLE_MULTIPLE_INSTANCES
|
||||||
|
|||||||
Reference in New Issue
Block a user