Commit b1b92af
committed
Fix Clang error when disabling Zicsr
When using 'make ENABLE_Zicsr=0 CC=clang', the following error is
observed:
src/emulate.c:83:20: error: unused function 'update_time' [-Werror,-Wunused-function]
83 | static inline void update_time(riscv_t *rv)
| ^~~~~~~~~~~
1 error generated
Fix this by guarding the update_time function definition with
RV32_HAS(Zicsr) macro. This ensures the function is only defined
when the Zicsr is enabled.1 parent 300c692 commit b1b92af
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| |||
0 commit comments