Skip to content

Commit

Permalink
Ameba Build Issue (#13498)
Browse files Browse the repository at this point in the history
When moving the files from examples/thermostat/ameba/main to top level of project. GLOBAL_CFLAGS += -DCHIP_PROJECT=1  must be included in the make file.  make all would fail with CHIP_PROJECT=1 becuase the type def's for u32, and u64 were removed
But when u32 is undefined during the chip_main build connectedhomeip/src/lib/core/CHIPTLVReader.cpp will fail since u32 is used a a variable name.
  • Loading branch information
chrisbeach59 authored and pull[bot] committed Nov 20, 2023
1 parent e7ac9be commit 1210422
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/core/CHIPTLVReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ namespace {
float BitCastToFloat(const uint64_t elemLenOrVal)
{
float f;
auto u32 = static_cast<uint32_t>(elemLenOrVal);
memcpy(&f, &u32, sizeof(f));
auto unsigned32 = static_cast<uint32_t>(elemLenOrVal);
memcpy(&f, &unsigned32, sizeof(f));
return f;
}
} // namespace
Expand Down

0 comments on commit 1210422

Please sign in to comment.