Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation warnings #182

Merged
merged 4 commits into from
Nov 17, 2024
Merged

Fix compilation warnings #182

merged 4 commits into from
Nov 17, 2024

Conversation

ldotlopez
Copy link
Contributor

@ldotlopez ldotlopez commented Nov 15, 2024

Fix the following warnings

Compiling .pioenvs/living-room-ac/src/esphome/components/cn105/cycle_management.o
src/esphome/components/cn105/climateControls.cpp: In member function 'void CN105Climate::controlDelegate(const esphome::climate::ClimateCall&)':
src/esphome/components/cn105/climateControls.cpp:32:32: warning: implicitly-declared 'constexpr wantedHeatpumpSettings::wantedHeatpumpSettings(const wantedHeatpumpSettings&)' is deprecated [-Wdeprecated-copy]
   32 |     logCheckWantedSettingsMutex(this->wantedSettings);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from src/esphome/components/cn105/cn105.h:2,
                 from src/esphome/components/cn105/climateControls.cpp:1:
src/esphome/components/cn105/Globals.h:195:29: note: because 'wantedHeatpumpSettings' has user-provided 'wantedHeatpumpSettings& wantedHeatpumpSettings::operator=(const wantedHeatpumpSettings&)'
  195 |     wantedHeatpumpSettings& operator=(const wantedHeatpumpSettings& other) {
      |                             ^~~~~~~~
src/esphome/components/cn105/climateControls.cpp:17:57: note:   initializing argument 1 of 'void logCheckWantedSettingsMutex(wantedHeatpumpSettings)'
   17 | void logCheckWantedSettingsMutex(wantedHeatpumpSettings settings) {
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
src/esphome/components/cn105/climateControls.cpp:83:36: warning: implicitly-declared 'constexpr wantedHeatpumpSettings::wantedHeatpumpSettings(const wantedHeatpumpSettings&)' is deprecated [-Wdeprecated-copy]
   83 |         logCheckWantedSettingsMutex(this->wantedSettings);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/cn105/Globals.h:195:29: note: because 'wantedHeatpumpSettings' has user-provided 'wantedHeatpumpSettings& wantedHeatpumpSettings::operator=(const wantedHeatpumpSettings&)'
  195 |     wantedHeatpumpSettings& operator=(const wantedHeatpumpSettings& other) {
      |                             ^~~~~~~~
src/esphome/components/cn105/climateControls.cpp:17:57: note:   initializing argument 1 of 'void logCheckWantedSettingsMutex(wantedHeatpumpSettings)'
   17 | void logCheckWantedSettingsMutex(wantedHeatpumpSettings settings) {
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
src/esphome/components/cn105/climateControls.cpp:87:28: warning: implicitly-declared 'constexpr wantedHeatpumpSettings::wantedHeatpumpSettings(const wantedHeatpumpSettings&)' is deprecated [-Wdeprecated-copy]
   87 |         this->debugSettings("control (wantedSettings)", this->wantedSettings);
      |         ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/cn105/Globals.h:195:29: note: because 'wantedHeatpumpSettings' has user-provided 'wantedHeatpumpSettings& wantedHeatpumpSettings::operator=(const wantedHeatpumpSettings&)'
  195 |     wantedHeatpumpSettings& operator=(const wantedHeatpumpSettings& other) {
      |                             ^~~~~~~~
src/esphome/components/cn105/cn105.h:261:72: note:   initializing argument 2 of 'void CN105Climate::debugSettings(const char*, wantedHeatpumpSettings)'
  261 |     void debugSettings(const char* settingName, wantedHeatpumpSettings settings);
      |                                                 ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Compiling .pioenvs/living-room-ac/src/esphome/components/cn105/extraComponents.o
Compiling .pioenvs/living-room-ac/src/esphome/components/cn105/heatpumpFunctions.o
Compiling .pioenvs/living-room-ac/src/esphome/components/cn105/hp_readings.o
Compiling .pioenvs/living-room-ac/src/esphome/components/cn105/hp_writings.o
src/esphome/components/cn105/hp_readings.cpp: In member function 'void CN105Climate::getSettingsFromResponsePacket()':
src/esphome/components/cn105/hp_readings.cpp:221:25: warning: implicitly-declared 'constexpr heatpumpSettings::heatpumpSettings(const heatpumpSettings&)' is deprecated [-Wdeprecated-copy]
  221 |     this->heatpumpUpdate(receivedSettings);
      |     ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
In file included from src/esphome/components/cn105/cn105.h:2,
                 from src/esphome/components/cn105/hp_readings.cpp:1:
src/esphome/components/cn105/Globals.h:146:23: note: because 'heatpumpSettings' has user-provided 'heatpumpSettings& heatpumpSettings::operator=(const heatpumpSettings&)'
  146 |     heatpumpSettings& operator=(const heatpumpSettings& other) {
      |                       ^~~~~~~~
src/esphome/components/cn105/cn105.h:243:42: note:   initializing argument 1 of 'void CN105Climate::heatpumpUpdate(heatpumpSettings)'
  243 |     void heatpumpUpdate(heatpumpSettings settings);
      |                         ~~~~~~~~~~~~~~~~~^~~~~~~~
src/esphome/components/cn105/hp_readings.cpp: In member function 'void CN105Climate::heatpumpUpdate(heatpumpSettings)':
src/esphome/components/cn105/hp_readings.cpp:515:24: warning: implicitly-declared 'constexpr heatpumpSettings::heatpumpSettings(const heatpumpSettings&)' is deprecated [-Wdeprecated-copy]
  515 |     this->debugSettings("current", this->currentSettings);
      |     ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/cn105/Globals.h:146:23: note: because 'heatpumpSettings' has user-provided 'heatpumpSettings& heatpumpSettings::operator=(const heatpumpSettings&)'
  146 |     heatpumpSettings& operator=(const heatpumpSettings& other) {
      |                       ^~~~~~~~
src/esphome/components/cn105/cn105.h:260:66: note:   initializing argument 2 of 'void CN105Climate::debugSettings(const char*, heatpumpSettings)'
  260 |     void debugSettings(const char* settingName, heatpumpSettings settings);
      |                                                 ~~~~~~~~~~~~~~~~~^~~~~~~~
src/esphome/components/cn105/hp_readings.cpp:516:24: warning: implicitly-declared 'constexpr heatpumpSettings::heatpumpSettings(const heatpumpSettings&)' is deprecated [-Wdeprecated-copy]
  516 |     this->debugSettings("received", settings);
      |     ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/cn105/Globals.h:146:23: note: because 'heatpumpSettings' has user-provided 'heatpumpSettings& heatpumpSettings::operator=(const heatpumpSettings&)'
  146 |     heatpumpSettings& operator=(const heatpumpSettings& other) {
      |                       ^~~~~~~~
src/esphome/components/cn105/cn105.h:260:66: note:   initializing argument 2 of 'void CN105Climate::debugSettings(const char*, heatpumpSettings)'
  260 |     void debugSettings(const char* settingName, heatpumpSettings settings);
      |                                                 ~~~~~~~~~~~~~~~~~^~~~~~~~
src/esphome/components/cn105/hp_readings.cpp:517:24: warning: implicitly-declared 'constexpr wantedHeatpumpSettings::wantedHeatpumpSettings(const wantedHeatpumpSettings&)' is deprecated [-Wdeprecated-copy]
  517 |     this->debugSettings("wanted", this->wantedSettings);
      |     ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/cn105/Globals.h:195:29: note: because 'wantedHeatpumpSettings' has user-provided 'wantedHeatpumpSettings& wantedHeatpumpSettings::operator=(const wantedHeatpumpSettings&)'
  195 |     wantedHeatpumpSettings& operator=(const wantedHeatpumpSettings& other) {
      |                             ^~~~~~~~
src/esphome/components/cn105/cn105.h:261:72: note:   initializing argument 2 of 'void CN105Climate::debugSettings(const char*, wantedHeatpumpSettings)'
  261 |     void debugSettings(const char* settingName, wantedHeatpumpSettings settings);
      |                                                 ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
src/esphome/components/cn105/hp_readings.cpp:523:27: warning: implicitly-declared 'constexpr heatpumpSettings::heatpumpSettings(const heatpumpSettings&)' is deprecated [-Wdeprecated-copy]
  523 |     this->publishStateToHA(settings);
      |     ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
src/esphome/components/cn105/Globals.h:146:23: note: because 'heatpumpSettings' has user-provided 'heatpumpSettings& heatpumpSettings::operator=(const heatpumpSettings&)'
  146 |     heatpumpSettings& operator=(const heatpumpSettings& other) {
      |                       ^~~~~~~~
src/esphome/components/cn105/hp_readings.cpp:476:54: note:   initializing argument 1 of 'void CN105Climate::publishStateToHA(heatpumpSettings)'
  476 | void CN105Climate::publishStateToHA(heatpumpSettings settings) {
      |                                     ~~~~~~~~~~~~~~~~~^~~~~~~~
src/esphome/components/cn105/hp_readings.cpp: In member function 'void CN105Climate::checkWideVaneSettings(heatpumpSettings&, bool)':
src/esphome/components/cn105/hp_readings.cpp:566:28: warning: implicitly-declared 'constexpr heatpumpSettings::heatpumpSettings(const heatpumpSettings&)' is deprecated [-Wdeprecated-copy]
  566 |         this->debugSettings("settings", settings);
      |         ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/cn105/Globals.h:146:23: note: because 'heatpumpSettings' has user-provided 'heatpumpSettings& heatpumpSettings::operator=(const heatpumpSettings&)'
  146 |     heatpumpSettings& operator=(const heatpumpSettings& other) {
      |                       ^~~~~~~~
src/esphome/components/cn105/cn105.h:260:66: note:   initializing argument 2 of 'void CN105Climate::debugSettings(const char*, heatpumpSettings)'
  260 |     void debugSettings(const char* settingName, heatpumpSettings settings);
      |                                                 ~~~~~~~~~~~~~~~~~^~~~~~~~
src/esphome/components/cn105/hp_writings.cpp: In member function 'void CN105Climate::sendWantedSettingsDelegate()':
src/esphome/components/cn105/hp_writings.cpp:249:24: warning: implicitly-declared 'constexpr wantedHeatpumpSettings::wantedHeatpumpSettings(const wantedHeatpumpSettings&)' is deprecated [-Wdeprecated-copy]
  249 |     this->debugSettings("wantedSettings", wantedSettings);
      |     ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/esphome/components/cn105/cn105.h:2,
                 from src/esphome/components/cn105/hp_writings.cpp:1:
src/esphome/components/cn105/Globals.h:195:29: note: because 'wantedHeatpumpSettings' has user-provided 'wantedHeatpumpSettings& wantedHeatpumpSettings::operator=(const wantedHeatpumpSettings&)'
  195 |     wantedHeatpumpSettings& operator=(const wantedHeatpumpSettings& other) {
      |                             ^~~~~~~~
src/esphome/components/cn105/cn105.h:261:72: note:   initializing argument 2 of 'void CN105Climate::debugSettings(const char*, wantedHeatpumpSettings)'
  261 |     void debugSettings(const char* settingName, wantedHeatpumpSettings settings);
      |                                                 ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Compiling .pioenvs/living-room-ac/src/esphome/components/cn105/uptime_connection_sensor.o
Compiling .pioenvs/living-room-ac/src/esphome/components/cn105/utils.o
Compiling .pioenvs/living-room-ac/src/esphome/components/copy/sensor/copy_sensor.o
Compiling .pioenvs/living-room-ac/src/esphome/components/esp32/core.o
Compiling .pioenvs/living-room-ac/src/esphome/components/esp32/gpio.o
Compiling .pioenvs/living-room-ac/src/esphome/components/esp32/preferences.o
Compiling .pioenvs/living-room-ac/src/esphome/components/esphome/ota/ota_esphome.o
Compiling .pioenvs/living-room-ac/src/esphome/components/gpio/binary_sensor/gpio_binary_sensor.o
src/esphome/components/cn105/utils.cpp: In member function 'void CN105Climate::debugSettingsAndStatus(const char*, heatpumpSettings, heatpumpStatus)':
src/esphome/components/cn105/utils.cpp:144:24: warning: implicitly-declared 'constexpr heatpumpSettings::heatpumpSettings(const heatpumpSettings&)' is deprecated [-Wdeprecated-copy]
  144 |     this->debugSettings(settingName, settings);
      |     ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from src/esphome/components/cn105/cn105.h:2,
                 from src/esphome/components/cn105/utils.cpp:1:
src/esphome/components/cn105/Globals.h:146:23: note: because 'heatpumpSettings' has user-provided 'heatpumpSettings& heatpumpSettings::operator=(const heatpumpSettings&)'
  146 |     heatpumpSettings& operator=(const heatpumpSettings& other) {
      |                       ^~~~~~~~
src/esphome/components/cn105/utils.cpp:101:76: note:   initializing argument 2 of 'void CN105Climate::debugSettings(const char*, heatpumpSettings)'
  101 | void CN105Climate::debugSettings(const char* settingName, heatpumpSettings settings) {
      |                                                           ~~~~~~~~~~~~~~~~~^~~~~~~~

@echavet
Copy link
Owner

echavet commented Nov 17, 2024

Thanks for pull req
I'll check that soon

@echavet echavet merged commit fb827f8 into echavet:main Nov 17, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants