From 1210422ccc299f310721b00697ec267f6a2a5f5d Mon Sep 17 00:00:00 2001 From: chrisbeach59 <33329862+chrisbeach59@users.noreply.github.com> Date: Wed, 12 Jan 2022 13:15:35 -0500 Subject: [PATCH] Ameba Build Issue (#13498) 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. --- src/lib/core/CHIPTLVReader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/core/CHIPTLVReader.cpp b/src/lib/core/CHIPTLVReader.cpp index 4af5d8d9b3d84b..18950d7111e863 100644 --- a/src/lib/core/CHIPTLVReader.cpp +++ b/src/lib/core/CHIPTLVReader.cpp @@ -245,8 +245,8 @@ namespace { float BitCastToFloat(const uint64_t elemLenOrVal) { float f; - auto u32 = static_cast(elemLenOrVal); - memcpy(&f, &u32, sizeof(f)); + auto unsigned32 = static_cast(elemLenOrVal); + memcpy(&f, &unsigned32, sizeof(f)); return f; } } // namespace