Fix some printf formats for size_t. (#6542)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Clyde Stubbs 2024-04-18 15:03:15 +10:00 committed by GitHub
parent 2e7ac26ada
commit 8c31aea94f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -12,7 +12,7 @@ void Select::publish_state(const std::string &state) {
if (index.has_value()) { if (index.has_value()) {
this->has_state_ = true; this->has_state_ = true;
this->state = state; this->state = state;
ESP_LOGD(TAG, "'%s': Sending state %s (index %d)", name, state.c_str(), index.value()); ESP_LOGD(TAG, "'%s': Sending state %s (index %zu)", name, state.c_str(), index.value());
this->state_callback_.call(state, index.value()); this->state_callback_.call(state, index.value());
} else { } else {
ESP_LOGE(TAG, "'%s': invalid state for publish_state(): %s", name, state.c_str()); ESP_LOGE(TAG, "'%s': invalid state for publish_state(): %s", name, state.c_str());

View file

@ -71,7 +71,7 @@ void SelectCall::perform() {
return; return;
} }
if (this->index_.value() >= options.size()) { if (this->index_.value() >= options.size()) {
ESP_LOGW(TAG, "'%s' - Index value %d out of bounds", name, this->index_.value()); ESP_LOGW(TAG, "'%s' - Index value %zu out of bounds", name, this->index_.value());
return; return;
} }
target_value = options[this->index_.value()]; target_value = options[this->index_.value()];

View file

@ -79,7 +79,7 @@ SkipInitialFilter::SkipInitialFilter(size_t num_to_ignore) : num_to_ignore_(num_
optional<float> SkipInitialFilter::new_value(float value) { optional<float> SkipInitialFilter::new_value(float value) {
if (num_to_ignore_ > 0) { if (num_to_ignore_ > 0) {
num_to_ignore_--; num_to_ignore_--;
ESP_LOGV(TAG, "SkipInitialFilter(%p)::new_value(%f) SKIPPING, %u left", this, value, num_to_ignore_); ESP_LOGV(TAG, "SkipInitialFilter(%p)::new_value(%f) SKIPPING, %zu left", this, value, num_to_ignore_);
return {}; return {};
} }