Skip to content

Conversation

@lucasssvaz
Copy link
Member

Description of Change

This pull request standardizes the usage of format specifiers in Serial.printf calls across multiple example files, replacing %d and %u with %zu (for size_t values) and %lu (for unsigned long values). This improves type safety and ensures correct output formatting, especially on platforms where size_t and related types may differ in size from int or unsigned int.

Serial output formatting improvements:

  • Replaced %d and %u with %zu in Serial.printf statements for variables of type size_t in UDP, Bluetooth, BLE, and Serial examples, ensuring proper formatting for buffer sizes, data lengths, and counts. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23]
  • Updated %ld to %lu in Serial.printf for unsigned long variables, such as delay times, to match the variable type in deep sleep and progress reporting examples. [1] [2]

These changes help prevent formatting errors and potential undefined behavior, making the code more robust and portable across platforms.

@lucasssvaz lucasssvaz self-assigned this Dec 22, 2025
@lucasssvaz lucasssvaz requested review from a team, SuGlider and me-no-dev as code owners December 22, 2025 16:33
@github-actions
Copy link
Contributor

Messages
📖 🎉 Good Job! All checks are passing!

👋 Hello lucasssvaz, we appreciate your contribution to this project!


📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more.

🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project.

Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against e44cec4

@github-actions
Copy link
Contributor

Memory usage test (comparing PR against master branch)

The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.

MemoryFLASH [bytes]FLASH [%]RAM [bytes]RAM [%]
TargetDECINCDECINCDECINCDECINC
ESP32C5000.000.00000.000.00
ESP32P4000.000.00000.000.00
ESP32S3000.000.00000.000.00
ESP32S2000.000.00000.000.00
ESP32C3💚 -320💚 -0.010.00000.000.00
ESP32C6000.000.00000.000.00
ESP32H2000.000.00000.000.00
ESP320⚠️ +320.00⚠️ +0.01000.000.00
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32C5ESP32P4ESP32S3ESP32S2ESP32C3ESP32C6ESP32H2ESP32
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
libraries/AsyncUDP/examples/AsyncUDPClient--0000000000--00
libraries/AsyncUDP/examples/AsyncUDPMulticastServer--00000000----⚠️ +160
libraries/AsyncUDP/examples/AsyncUDPServer--00000000----00
libraries/BLE/examples/Beacon_Scanner--00----00--0000
libraries/ESP32/examples/ArduinoStackSize--00--0000--00⚠️ +320
libraries/ESP32/examples/RMT/RMTLoopback--00--0000--0000
libraries/ESP32/examples/Serial/OnReceiveError_BREAK_Demo--00--0000--00⚠️ +160
libraries/ESP32/examples/Serial/OnReceive_Demo--00--0000--00⚠️ +160
libraries/ESP32/examples/Serial/RxFIFOFull_Demo--00--0000--0000
libraries/ESP32/examples/Serial/RxTimeout_Demo--00--0000--0000
libraries/ESP32/examples/Serial/Serial_STD_Func_OnReceive--00--0000--0000
libraries/FFat/examples/FFat_Test--00--0000--0000
libraries/HTTPUpdateServer/examples/WebUpdater--00--0000----00
libraries/LittleFS/examples/LITTLEFS_test--00--0000--0000
libraries/SD/examples/SD_Test--00--00💚 -320--0000
libraries/SPIFFS/examples/SPIFFS_Test--00--0000--00⚠️ +160
libraries/Update/examples/HTTP_Client_AES_OTA_Update--00--0000----⚠️ +160
libraries/Update/examples/HTTP_Server_AES_OTA_Update--00--0000----00
libraries/Update/examples/OTAWebUpdater--00--0000----00
libraries/Update/examples/Signed_OTA_Update--00--0000----00
libraries/WebServer/examples/WebUpdate--00--0000----00
libraries/SD_MMC/examples/SDMMC_Test--00----------00
libraries/BluetoothSerial/examples/DiscoverConnect--------------00
libraries/ESP32/examples/DeepSleep/SmoothBlink_ULP_Code--------------00

@github-actions
Copy link
Contributor

Test Results

 90 files   90 suites   31m 45s ⏱️
 66 tests  66 ✅ 0 💤 0 ❌
675 runs  675 ✅ 0 💤 0 ❌

Results for commit e44cec4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant