From d9caafa3be9631a1d13e2268cccd0d3a97f4d90a Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: 2024年5月17日 15:17:22 +0200 Subject: lightning.c: Fix some build errors and warnings - When the NDEBUG macro was set, the build would fail as the code would reference a variable that's not defined in that case. - The code had a "fail" jump label which was only referenced in the case where the code was compiled with the HAVE_MMAP macro set. Signed-off-by: Paul Cercueil --- lib/lightning.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/lightning.c') diff --git a/lib/lightning.c b/lib/lightning.c index b40d35b..e4a8c65 100644 --- a/lib/lightning.c +++ b/lib/lightning.c @@ -1804,8 +1804,8 @@ _jit_patch_abs(jit_state_t *_jit, jit_node_t *instr, jit_pointer_t address) default: #ifndef NDEBUG mask = jit_classify(instr->code); -#endif assert((mask & (jit_cc_a0_reg|jit_cc_a0_jmp)) == jit_cc_a0_jmp); +#endif instr->u.p = address; } } @@ -1834,8 +1834,8 @@ _jit_patch_at(jit_state_t *_jit, jit_node_t *instr, jit_node_t *label) default: #ifndef NDEBUG mask = jit_classify(instr->code); -#endif assert((mask & (jit_cc_a0_reg|jit_cc_a0_jmp)) == jit_cc_a0_jmp); +#endif assert(label->code == jit_code_label); instr->u.n = label; break; @@ -2627,8 +2627,11 @@ _jit_emit(jit_state_t *_jit) #endif /* HAVE_MMAP */ return (_jit->code.ptr); + +#if HAVE_MMAP fail: return (NULL); +#endif /* HAVE_MMAP */ } void -- cgit v1.2.3

AltStyle によって変換されたページ (->オリジナル) /