linker: undefine the no-ops dt macros at the end of the file
Undefine the DT_NODE_HAS_STATUS and DT_NODE_HAS_STATUS_OKAY no nop at the end of the file so other uses can include devicetree.h without generating a compiler warning. Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit is contained in:
parent
7635455f15
commit
274c848571
1 changed files with 6 additions and 1 deletions
|
|
@ -28,7 +28,7 @@
|
|||
/* We need to dummy out DT_NODE_HAS_STATUS when building the unittests.
|
||||
* Including devicetree.h would require generating dummy header files
|
||||
* to match what gen_defines creates, so it's easier to just dummy out
|
||||
* DT_NODE_HAS_STATUS.
|
||||
* DT_NODE_HAS_STATUS. These are undefined at the end of the file.
|
||||
*/
|
||||
#ifdef ZTEST_UNITTEST
|
||||
#define DT_NODE_HAS_STATUS(node, status) 0
|
||||
|
|
@ -359,4 +359,9 @@ extern char lnkr_ondemand_rodata_size[];
|
|||
#endif /* CONFIG_LINKER_USE_ONDEMAND_SECTION */
|
||||
#endif /* ! _ASMLANGUAGE */
|
||||
|
||||
#ifdef ZTEST_UNITTEST
|
||||
#undef DT_NODE_HAS_STATUS
|
||||
#undef DT_NODE_HAS_STATUS_OKAY
|
||||
#endif
|
||||
|
||||
#endif /* ZEPHYR_INCLUDE_LINKER_LINKER_DEFS_H_ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue