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