[PR #1740] [MERGED] Fix compilation warning when compiling with -Wformat flag #1814

Closed
opened 2026-02-28 02:13:06 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/tzapu/WiFiManager/pull/1740
Author: @PBrunot
Created: 5/17/2024
Status: Merged
Merged: 2/5/2025
Merged by: @tablatronix

Base: masterHead: remove-warning


📝 Commits (1)

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 WiFiManager.cpp (+1 -1)

📄 Description

Compiler warning : format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint32_t'

The compiler warning arises because the format specifier %lu expects a long unsigned int, but the variable free is of type uint32_t (which is typically unsigned int). The ESP32, part of the Espressif32 family, typically defines uint32_t as unsigned int, so using the %u format specifier is appropriate.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/tzapu/WiFiManager/pull/1740 **Author:** [@PBrunot](https://github.com/PBrunot) **Created:** 5/17/2024 **Status:** ✅ Merged **Merged:** 2/5/2025 **Merged by:** [@tablatronix](https://github.com/tablatronix) **Base:** `master` ← **Head:** `remove-warning` --- ### 📝 Commits (1) - [`0404abd`](https://github.com/tzapu/WiFiManager/commit/0404abde0d9d2da5c09be7d0cc669b1188bb1c81) Fix compilation warning ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `WiFiManager.cpp` (+1 -1) </details> ### 📄 Description Compiler warning : format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint32_t' The compiler warning arises because the format specifier %lu expects a long unsigned int, but the variable free is of type uint32_t (which is typically unsigned int). The ESP32, part of the Espressif32 family, typically defines uint32_t as unsigned int, so using the %u format specifier is appropriate. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 02:13:06 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#1814
No description provided.