Skip to content

Commit

Permalink
Support 64-bit build
Browse files Browse the repository at this point in the history
  • Loading branch information
mikee47 committed Jun 12, 2024
1 parent a44b584 commit 4c408bf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/include/FlashString/Object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
*/
#define FSTR_CHECK_STRUCT(name) \
static_assert(std::is_standard_layout<decltype(name)>::value, "FSTR structure not Standard Layout"); \
static_assert(offsetof(decltype(name), data) == sizeof(uint32_t), "FSTR structure alignment error");
static_assert(offsetof(decltype(name), data) % sizeof(uint32_t) == 0, "FSTR structure alignment error");

/**
* @brief Import an object from an external file with reference
Expand Down
2 changes: 1 addition & 1 deletion src/include/FlashString/ObjectBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class ObjectBase

/* Member data must be public for initialisation to work but DO NOT ACCESS DIRECTLY !! */

const uint32_t flashLength_;
const size_t flashLength_;
// const uint8_t data[]

protected:
Expand Down
2 changes: 1 addition & 1 deletion test/app/array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ struct Item {

size_t printTo(Print& p) const
{
return p.printf("%s=%u, %ux%ux%u cm", toString(kind).c_str(), count, size.cx, size.cy, size.cz);
return p.printf("%s=%u, %lux%lux%lu cm", toString(kind).c_str(), count, size.cx, size.cy, size.cz);
}
};

Expand Down
2 changes: 1 addition & 1 deletion test/app/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class MapTest : public TestGroup

TEST_CASE("Map of enum MapKey => String")
{
Serial.printf(_F("enumMap[%u]\n"), enumMap.length());
Serial.printf(_F("enumMap[%lu]\n"), enumMap.length());

Serial.println(_F(" for-loop:"));
for(unsigned i = 0; i < enumMap.length(); ++i) {
Expand Down

0 comments on commit 4c408bf

Please sign in to comment.