fix errors flagged by clang static analyzer

builtin.c: bug - free of uninitialized jv
compile.c: missing assertion
jq_test.c: buggy logic / unreachable code
jv.c: missing assertion
jv_alloc.c: false positive - intentional read of uninitialized memory
jv_file.c: dead code
This commit is contained in:
David Tolnay authored and Nicolas Williams committed 2015-06-20 16:08:56 -05:00
1 parent 7811ef1e17
commit 4a316fbb5a
6 files changed
+12 -9

No files matched your search

+1 -1
View File
@@ -943,7 +943,7 @@ block gen_cbinding(const struct cfunction* cfunctions, int ncfunctions, block co
static uint16_t nesting_level(struct bytecode* bc, inst* target) {
uint16_t level = 0;
assert(bc && target->compiled);
assert(bc && target && target->compiled);
while (bc && target->compiled != bc) {
level++;
bc = bc->parent;