Skip to content

Fix compilation warning

Latest
Compare
Choose a tag to compare
@mmakaay mmakaay released this 05 Jan 19:58

Fixes the following compilation warning when using the latest version of ESPHome to compile the lamp's firmware:

src/esphome/components/xiaomi_bslamp2/binary_sensor/../front_panel_hal.h:197:10:
warning: '++' expression of 'volatile'-qualified type is deprecated [-Wvolatile]
197 | store->event_id++;

Is upgrading required?

Upgrading is not required at this point. The warning announces that the use of ++ is deprecated.
The firmware will still compile and will work without issues when using the previous firmware release.

At some point in the future, ++ will likely stop to work, and compilation will then fail.
Then, upgrading will be required.

How to upgrade your device

The basic steps for upgrading are:

  1. Upgrade ESPHome to 2024.10.0 or later;
  2. Update your device configuration (see below);
  3. Compile and upload the new firmware.

If you have used the example.yaml to create your configuration, then update the configuration package ref: to point to release/2025.1.0.

packages:
  bslamp2:
    url: https://github.com/mmakaay/esphome-xiaomi_bslamp2
    ref: release/2025.1.0 <--- update this one
    files:
      ...
      ...