Open mhgue opened 1 year ago
Note that compound assignments to volatile variables will be un-deprecated in C++23 (supported since GCC 13), so I'm not sure if we should like to make the LL code less readable and more prone to copy-paste errors by making similar changes across many files:
- dev->lc_dma_int_ena.val |= mask & 0x03;
+ dev->lc_dma_int_ena.val = dev->lc_dma_int_ena.val | (mask & 0x03);
A workaround for now could be to use a pragma to disable this warning around the inclusion of the LL files:
#pragma GCC diagnostic ignored "-Wvolatile"
#include "hal/gdma_ll.h"
#pragma GCC pop
That said, GCC 13 support in IDF will only come in IDF v5.2, so if there are not too many LL code lines to fix, this patch could be acceptable for the time being.
A workaround for now could be to use a pragma to disable this warning around the inclusion of the LL files:
#pragma GCC diagnostic ignored "-Wvolatile" #include "hal/gdma_ll.h" #pragma GCC pop
This needs to be done in all files including that header, even for external components. Wouldn't it be better to solve that problem inside the causing header?
Answers checklist.
IDF version.
v5.0.1-3-g886e98a2c1
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
What is the expected behavior?
Clean compile
What is the actual behavior?
Compile error.
Steps to reproduce.
Add any
*.c
file includinggdma_ll.h
orlcd_ll.h
e.g.components/LovyanGFX/src/lgfx/v1/platforms/esp32s3/Bus_RGB.cpp
Build or installation Logs.
More Information.
Similar to #9170 but concerning different header.
Can be fixed by: