Skip to content

Commit

Permalink
Fix printf type declaration
Browse files Browse the repository at this point in the history
Partition size and address are u32, so printf variable declarations should be `lu` and `lx` respectively to declare them `long` to cover the 32-bit input datatypes.
  • Loading branch information
nomakewan authored Oct 30, 2024
1 parent 4c771c5 commit 36471bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/AttenuatorESP32/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void printPartitions() {
Serial.println(F("Partitions:"));
while (iterator != nullptr) {
partition = esp_partition_get(iterator);
Serial.printf("Label: %s, Size: %u bytes, Address: 0x%08X\n",
Serial.printf("Label: %s, Size: %lu bytes, Address: 0x%08lx\n",
partition->label,
partition->size,
partition->address);
Expand Down

0 comments on commit 36471bb

Please sign in to comment.