lightning.git - Portable just-in-time compiler library

index : lightning.git
Portable just-in-time compiler library
summary refs log tree commit diff
diff options
context:
space:
mode:
authorPaul Cercueil <paul@crapouillou.net>2024年05月17日 15:17:22 +0200
committerpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2024年05月28日 10:28:41 -0300
commitd9caafa3be9631a1d13e2268cccd0d3a97f4d90a (patch)
tree819892c47560883bb6bda79e221ec51d311635e0
parente6823b06c215744c56c6d2ff7771b2a997bb6d8d (diff)
downloadlightning-d9caafa3be9631a1d13e2268cccd0d3a97f4d90a.tar.gz
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 <paul@crapouillou.net>
Diffstat
-rw-r--r--lib/lightning.c 7
1 files changed, 5 insertions, 2 deletions
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
generated by cgit v1.2.3 (git 2.25.1) at 2025年09月06日 15:04:46 +0000

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