Skip to content

Commit

Permalink
Fix some printf formats for size_t.
Browse files Browse the repository at this point in the history
  • Loading branch information
clydebarrow committed Apr 17, 2024
1 parent 7733781 commit 88169f6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion esphome/components/select/select.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void Select::publish_state(const std::string &state) {
if (index.has_value()) {
this->has_state_ = true;
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());
} else {
ESP_LOGE(TAG, "'%s': invalid state for publish_state(): %s", name, state.c_str());
Expand Down
2 changes: 1 addition & 1 deletion esphome/components/select/select_call.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void SelectCall::perform() {
return;
}
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;
}
target_value = options[this->index_.value()];
Expand Down
2 changes: 1 addition & 1 deletion esphome/components/sensor/filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ SkipInitialFilter::SkipInitialFilter(size_t num_to_ignore) : num_to_ignore_(num_
optional<float> SkipInitialFilter::new_value(float value) {
if (num_to_ignore_ > 0) {
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 {};
}

Expand Down

0 comments on commit 88169f6

Please sign in to comment.