ginkage / MHI-AC-Ctrl-ESPHome

ESPHome integration for MHI-AC-Ctrl project
MIT License
112 stars 39 forks source link

warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] 3.0 #106

Open EvoSems opened 4 days ago

EvoSems commented 4 days ago

Hi. just updated to 3.0 via flushing all build files via ssh. I do get this error on 2 units. will it be a problem? thanks

Compiling .pioenvs/master_bed_aircon/src/esphome/core/bytebuffer.cpp.o
src/esphome/core/bytebuffer.cpp: In member function 'float esphome::ByteBuffer::get_float()':
src/esphome/core/bytebuffer.cpp:86:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   86 |   return *(float *) &value;
      |           ^~~~~~~~~~~~~~~~
src/esphome/core/bytebuffer.cpp: In member function 'void esphome::ByteBuffer::put_float(float)':
src/esphome/core/bytebuffer.cpp:129:61: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  129 | void ByteBuffer::put_float(float value) { this->put_uint32(*(uint32_t *) &value); }
      |                                                             ^~~~~~~~~~~~~~~~~~~