diff options
author | David Tolnay <dtolnay@gmail.com> | 2015-06-19 10:33:35 -0700 |
---|---|---|
committer | Nicolas Williams <nico@cryptonector.com> | 2015-06-20 16:08:56 -0500 |
commit | 4a316fbb5a1119ebb74b271129d563fd284315bc (patch) | |
tree | 51fed5c676c00384c34b4fcc49611a19149a8136 /compile.c | |
parent | 7811ef1e1746f0963deb960af2c9623fb53c24a5 (diff) |
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
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |