Skip to content

CRITICAL: -Wvolatile compound assignment in channel_driver_lcd_spi.cpp.hpp:256 (hard error in C++23) #2723

Closed

Description

@zackees

Summary

-Wvolatile fires on a volatile compound assignment in the ESP32 LCD-SPI driver. C++20 deprecates this; C++23 made it a hard error.

warning: compound assignment with volatile-qualified left operand is deprecated [-Wvolatile]
  src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_spi.cpp.hpp:256
  ctx.mNextByteOffset += chunkBytes;

Why this is critical

ESP-IDF 5.x is already shipping with GCC 14, and the FastLED build matrix is moving toward C++23 / C++26. When the toolchain default crosses that line this becomes a build failure — not a warning. Better to fix it now while it is still a -Wvolatile.

Proposed fix

Explicit read-modify-write:

- ctx.mNextByteOffset += chunkBytes;
+ ctx.mNextByteOffset = ctx.mNextByteOffset + chunkBytes;

If mNextByteOffset does not actually need to be volatile (i.e. it is not a MMIO register or shared with an ISR via a different mechanism), the cleaner fix is to drop the volatile qualifier. Review IsrChunkContext invariants before choosing.

Evidence

Fires on the esp_extra_libs FastLED CI workflow.

Activity

  1. zackees commented on Jun 4, 2026

    @zackees
    MemberAuthor

    Tracked under fbuild meta-audit: FastLED/fbuild#408

  2. moved this from Triage to Done in FastLED Trackeron Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions