aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/builtin.c
diff options
context:
space:
mode:
authorBen Dooks <ben.dooks@codethink.co.uk>2018-10-30 10:36:26 +0000
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-10-05 12:56:10 +0200
commitefc02e9ee225d1327be004181da74f59f2aa2c11 (patch)
tree04803b041d535bde1eecd7aab2be20be38290721 /builtin.c
parent375690b61e8ec4735b19bcead756ba526edab57e (diff)
downloadsparse-format-check.tar.gz
evaluate: check variadic argument types against format stringformat-check
The variadic argument code did not check any of the variadic arguments as it did not previously know the possible type. Now we have the possible formatting information stored in the ctype, we can do some checks on the printf formatting types. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin.c b/builtin.c
index 26b612dc..ce9de28f 100644
--- a/builtin.c
+++ b/builtin.c
@@ -396,7 +396,7 @@ static int eval_sync_compare_and_swap(struct expression *expr)
if (!expr->ctype) // __sync_val_compare_and_swap()
expr->ctype = ctype;
- return evaluate_arguments(types, expr->args);
+ return evaluate_arguments(NULL, types, expr->args);
err:
sparse_error(arg->pos, "invalid type for argument %d:", n);