Skip to content

Commit 38068c6

Browse files
Build RP2350-ARM with -O3 (#3124)
* Build RP2350-ARM with -O3 Using -O3 identified a potential issue in #3122, so replace -Os with -O3 for the RP2350 builds in CI * Turn off fake warnings in LeaMDNS * More bogus warnings
1 parent f487bfe commit 38068c6

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

libraries/LEAmDNS/src/LEAmDNS_Helpers.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,13 @@ MDNSResponder::_findService(const MDNSResponder::hMDNSService p_hService) {
451451
SERVICE TXT
452452
*/
453453

454+
// There are many strncpy()s here that immediately set the terminating \0, but GCC
455+
// doesn't notice that and emits a warning at -O3 -Wall -Wextra. After inspection,
456+
// disable that specific warning since it's not a real problem
457+
458+
#pragma GCC diagnostic push
459+
#pragma GCC diagnostic ignored "-Wstringop-truncation"
460+
454461
/*
455462
MDNSResponder::_allocServiceTxt
456463
*/
@@ -489,6 +496,8 @@ MDNSResponder::_allocServiceTxt(MDNSResponder::stcMDNSService* p_pService, const
489496
return pTxt;
490497
}
491498

499+
#pragma GCC diagnostic pop
500+
492501
/*
493502
MDNSResponder::_releaseServiceTxt
494503
*/

libraries/LEAmDNS/src/LEAmDNS_Structs.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@
2626
#include "LEAmDNS_Priv.h"
2727
#include "LEAmDNS_lwIPdefs.h"
2828

29+
// There are many strncpy()s here that immediately set the terminating \0, but GCC
30+
// doesn't notice that and emits a warning at -O3 -Wall -Wextra. After inspection,
31+
// disable that specific warning since it's not a real problem
32+
33+
#pragma GCC diagnostic push
34+
#pragma GCC diagnostic ignored "-Wstringop-truncation"
35+
2936
namespace esp8266 {
3037

3138
/*
@@ -2020,3 +2027,5 @@ MDNSResponder::stcMDNSSendParameter::findCachedDomainOffset(const void* p_pHostn
20202027
} // namespace MDNSImplementation
20212028

20222029
} // namespace esp8266
2030+
2031+
#pragma GCC diagnostic pop

tests/build-rp2350.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ elif [ "$BUILD_PARITY" = "odd" ]; then
1515
rem=1
1616
fi
1717

18-
export FQBN=pico:rp2040:rpipico2:flash=4194304_0,arch=arm,freq=150,opt=Small,rtti=Disabled,stackprotect=Disabled,exceptions=Disabled,dbgport=Disabled,dbglvl=None,usbstack=picosdk,ipbtstack=ipv4only,uploadmethod=default
18+
export FQBN=pico:rp2040:rpipico2:flash=4194304_0,arch=arm,freq=150,opt=Optimize3,rtti=Disabled,stackprotect=Disabled,exceptions=Disabled,dbgport=Disabled,dbglvl=None,usbstack=picosdk,ipbtstack=ipv4only,uploadmethod=default
1919
export PICO_BOARD=rp2350
2020

2121
install_arduino nodebug

0 commit comments

Comments
 (0)