mirror of
https://github.com/esphome/esphome.git
synced 2025-01-31 10:10:56 +00:00
Fix some printf formats for size_t. (#6542)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
parent
2e7ac26ada
commit
8c31aea94f
@ -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());
|
||||||
|
@ -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()];
|
||||||
|
@ -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 {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user