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:
1 parent
7811ef1e17
commit
4a316fbb5a
6 files changed
+12
-9
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user