Commit 312c83f
committed
Fix Clang error when disabling BLOCK_CHAINING
When using 'make ENABLE_MBLOCK_CHAINING=0 CC=clang', the following
errors are observed:
src/emulate.c:555:19: error: unused function 'insn_is_unconditional_branch' [-Werror,-Wunused-function]
555 | FORCE_INLINE bool insn_is_unconditional_branch(uint8_t opcode)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/emulate.c:582:19: error: unused function 'insn_is_direct_branch' [-Werror,-Wunused-function]
582 | FORCE_INLINE bool insn_is_direct_branch(uint8_t opcode)
| ^~~~~~~~~~~~~~~~~~~~~
Fix this by guarding the 'insn_is_unconditional_branch' and
'insn_is_direct_branch' function definition with
RV32_HAS(BLOCK_CHAINING) macro. This ensures the functions are only
defined when the BLOCK_CHAINING is enabled.1 parent 4d5a96a commit 312c83f
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
552 | 552 | | |
553 | 553 | | |
554 | 554 | | |
| 555 | + | |
555 | 556 | | |
556 | 557 | | |
557 | 558 | | |
| |||
592 | 593 | | |
593 | 594 | | |
594 | 595 | | |
| 596 | + | |
595 | 597 | | |
596 | 598 | | |
597 | 599 | | |
| |||
0 commit comments