Fix more build warnings

This commit is contained in:
Marek Roszko 2024-03-23 08:38:30 -04:00
parent 1e6eb652aa
commit ab759d21f2
2 changed files with 7 additions and 1 deletions

View File

@ -1864,7 +1864,7 @@ void PCB_TUNING_PATTERN::SetProperties( const STRING_ANY_MAP& aProps )
aProps.get_to( "single_sided", m_settings.m_singleSided );
aProps.get_to( "side", m_settings.m_initialSide );
bool rounded;
bool rounded = false;
aProps.get_to( "rounded", rounded );
m_settings.m_cornerStyle = rounded ? PNS::MEANDER_STYLE_ROUND : PNS::MEANDER_STYLE_CHAMFER;

View File

@ -58,7 +58,13 @@ BOOST_AUTO_TEST_CASE( VPrint )
output.clear();
// Test 3: Edge case with zero characters
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wformat-zero-length"
#endif
StrPrintf( &output, "" );
#ifdef __GNUC__
#pragma GCC diagnostic warning "-Wformat-zero-length"
#endif
BOOST_ASSERT( output.empty() );
// Test 4: Mixing small and large strings