summaryrefslogtreecommitdiffstats
path: root/compile.c
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2015-06-19 10:33:35 -0700
committerNicolas Williams <nico@cryptonector.com>2015-06-20 16:08:56 -0500
commit4a316fbb5a1119ebb74b271129d563fd284315bc (patch)
tree51fed5c676c00384c34b4fcc49611a19149a8136 /compile.c
parent7811ef1e1746f0963deb960af2c9623fb53c24a5 (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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compile.c b/compile.c
index 742d1f54..36a93643 100644
--- a/compile.c
+++ b/compile.c
@@ -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;