From 4f9436208da7581e2d2c82491401f7c72d6b001e Mon Sep 17 00:00:00 2001 From: NewoPL <27411874+NewoPL@users.noreply.github.com> Date: Wed, 30 Oct 2024 23:22:36 +0100 Subject: [PATCH] [kp18058] remove minor compilation warnings / errors --- esphome/components/kp18058/kp18058.h | 2 +- esphome/components/kp18058/softi2c.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/kp18058/kp18058.h b/esphome/components/kp18058/kp18058.h index ad70877656..dfb6a93cd0 100644 --- a/esphome/components/kp18058/kp18058.h +++ b/esphome/components/kp18058/kp18058.h @@ -75,7 +75,7 @@ class kp18058_output : public output::FloatOutput { * Constructor for the kp18058_output class. * Initializes the channel with default values. */ - kp18058_output() : parent_(nullptr), value_(0) {} + kp18058_output() : value_(0), parent_(nullptr) {} /** * Sets the parent kp18058 driver instance for this output channel. diff --git a/esphome/components/kp18058/softi2c.cpp b/esphome/components/kp18058/softi2c.cpp index 7df7248c22..faf9d5f454 100644 --- a/esphome/components/kp18058/softi2c.cpp +++ b/esphome/components/kp18058/softi2c.cpp @@ -8,7 +8,7 @@ static const uint8_t SOFT_I2C_CLOCK_TIME = 50; void ns_sleep(int ns_delay) { // Create a delay by executing NOP instructions in a loop. - for (volatile int i = 0; i < ns_delay; i++) + for (volatile int i = 0; i < ns_delay; i += 1) __asm__("nop"); }