mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Add __attribute__((unused)) to generated test code (#2906)
Without this, the compiler will generate unused parameter warnings in the native version: test/output_export.cpp: In function ‘void output_start(unsigned int)’: test/output_export.cpp:6:32: error: unused parameter ‘baudrate’ [-Werror=unused-parameter] void output_start(unsigned int baudrate) ^~~~~~~~ cc1plus: all warnings being treated as errors
This commit is contained in:
committed by
Ivan Kravets
parent
e0ec4ff435
commit
0587f5b964
@ -148,7 +148,11 @@ class TestProcessorBase(object):
|
||||
"",
|
||||
"$object",
|
||||
"",
|
||||
"#ifdef __GNUC__",
|
||||
"void output_start(unsigned int baudrate __attribute__((unused)))",
|
||||
"#else",
|
||||
"void output_start(unsigned int baudrate)",
|
||||
"#endif",
|
||||
"{",
|
||||
" $begin;",
|
||||
"}",
|
||||
|
Reference in New Issue
Block a user