Fix Compile Time Warning in ESPHome 2026.7.3 - #4
Open
trenchcoatjedi wants to merge 1 commit into
Open
Conversation
Was getting a compile error on ESPHome 2026.7.3 related to handling of unsigned integers. This fixes the issue.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Was getting a compile error on ESPHome 2026.7.3 related to handling of unsigned integers.
/root/config/.esphome/build/chlorinator/src/esphome/core/gpio.h:6, from /root/config/.esphome/build/chlorinator/src/esphome/core/hal.h:5, from /root/config/.esphome/build/chlorinator/src/esphome/core/component.h:9, from /root/config/.esphome/build/chlorinator/src/esphome/components/intellichlor/intellichlor.h:3, from /root/config/.esphome/build/chlorinator/src/esphome/components/intellichlor/intellichlor.cpp:1: /root/config/.esphome/build/chlorinator/src/esphome/components/intellichlor/intellichlor.cpp: In member function 'void esphome::intellichlor::INTELLICHLORComponent::try_restore_boost_()': /root/config/.esphome/build/chlorinator/src/esphome/components/intellichlor/intellichlor.cpp:247:23: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=] 247 | ESP_LOGI(TAG, "Resumed boost: %u min remaining", remaining_s / 60UL); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /root/config/.esphome/build/chlorinator/src/esphome/core/log.h:83:36: note: in definition of macro 'ESPHOME_LOG_FORMAT' 83 | #define ESPHOME_LOG_FORMAT(format) format | ^~~~~~ /root/config/.esphome/build/chlorinator/src/esphome/core/log.h:162:28: note: in expansion of macro 'esph_log_i' 162 | #define ESP_LOGI(tag, ...) esph_log_i(tag, __VA_ARGS__) | ^~~~~~~~~~ /root/config/.esphome/build/chlorinator/src/esphome/components/intellichlor/intellichlor.cpp:247:9: note: in expansion of macro 'ESP_LOGI' 247 | ESP_LOGI(TAG, "Resumed boost: %u min remaining", remaining_s / 60UL); | ^~~~~~~~ /root/config/.esphome/build/chlorinator/src/esphome/components/intellichlor/intellichlor.cpp:247:40: note: format string is defined here 247 | ESP_LOGI(TAG, "Resumed boost: %u min remaining", remaining_s / 60UL); |This fixes the warning.