[lightning-ln882h] Fix -Wregister warnings from CmBacktrace cmb_def.h#376
[lightning-ln882h] Fix -Wregister warnings from CmBacktrace cmb_def.h#376Bl00d-B0b wants to merge 1 commit intolibretiny-eu:masterfrom
Conversation
…libretiny-eu#376) The LN882H SDK's CmBacktrace library (cmb_def.h) uses the 'register' storage class specifier in inline assembly helpers (cmb_get_msp/psp/sp). This keyword was removed in C++17 (P0001R1) and produces -Wregister warnings when compiling with -std=c++17. Add a fixup header that wraps the original cmb_def.h with GCC diagnostic pragmas to suppress the warning without modifying SDK sources.
…libretiny-eu#376) The LN882H SDK's CmBacktrace library (cmb_def.h) uses the 'register' storage class specifier in inline assembly helpers (cmb_get_msp/psp/sp). This keyword was removed in C++17 (P0001R1) and produces -Wregister warnings when compiling with -std=c++17. Add a fixup header that wraps the original cmb_def.h with GCC diagnostic pragmas to suppress the warning without modifying SDK sources.
…libretiny-eu#376) The LN882H SDK's CmBacktrace library (cmb_def.h) uses the 'register' storage class specifier in inline assembly helpers (cmb_get_msp/psp/sp). This keyword was removed in C++17 (P0001R1) and produces -Wregister warnings when compiling with -std=c++17. Add a fixup header that wraps the original cmb_def.h with GCC diagnostic pragmas to suppress the warning without modifying SDK sources.
0bee8a3 to
74cfab2
Compare
…libretiny-eu#376) The LN882H SDK's CmBacktrace library (cmb_def.h) uses the 'register' storage class specifier in inline assembly helpers (cmb_get_msp/psp/sp). This keyword was removed in C++17 (P0001R1) and produces -Wregister warnings when compiling with -std=c++17. Add a fixup header that wraps the original cmb_def.h with GCC diagnostic pragmas to suppress the warning without modifying SDK sources.
|
Why not just add Side note, LibreTiny doesn't use C++17 by default; ESPHome does. |
|
Agreed, Which build file should it go in? I am thinking somewhere in the |
|
The most logical place to add it would be the file where all other options are defined, |
…libretiny-eu#376) cmb_def.h uses the 'register' storage class specifier (removed in C++17) in cmb_get_msp/psp/sp(), producing 9 spurious -Wregister warnings per build when compiled with -std=c++17 (as ESPHome does). Add -Wno-register to CXXFLAGS to suppress the warning for C++ builds. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
74cfab2 to
c0c546e
Compare
…libretiny-eu#376) cmb_def.h uses the 'register' storage class specifier (removed in C++17) in cmb_get_msp/psp/sp(), producing 9 spurious -Wregister warnings per build when compiled with -std=c++17 (as ESPHome does). Add -Wno-register to CXXFLAGS to suppress the warning for C++ builds. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Done — reworked the PR to use |
The LN882H SDK CmBacktrace library (
cmb_def.h) uses theregisterstorage class specifier in three inline assembly helpers:cmb_get_msp(),cmb_get_psp(), andcmb_get_sp().This keyword was removed in C++17 (P0001R1), producing spurious
-Wregisterwarnings during every build when compiled with-std=c++17(as ESPHome does):The warning appears 9 times per build (3 inline functions x 3 translation units that include the header).
Fix: Add
-Wno-registertoCXXFLAGSinbuilder/family/lightning-ln882h.py. This is a no-op for plain LibreTiny builds (which do not use C++17) and only suppresses the warning for C++ consumers such as ESPHome.No SDK sources are modified.