On Mon, Nov 04, 2019 at 10:46:44PM +0100, Luc Van Oostenryck wrote: > On Fri, Nov 01, 2019 at 04:36:51PM +0000, Ben Dooks wrote: > > I've put the latest code up at: > > > > https://github.com/bjdooks-ct/sparse bjdooks/printf20 > > > > I think it has all the issues dealt with. > > > > I can't currently post or do a final test as away from work laptop. > > Thank you. > > I've a few more remarks about formatting or naming and > also some simplifications I would like you make. A typo and some formatting issues. >From 0522fbfc145c948401b9057a505428df83749cb9 Mon Sep 17 00:00:00 2001 From: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> Date: Mon, 4 Nov 2019 15:45:10 +0100 Subject: [PATCH 2/7] misc fixes --- evaluate.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/evaluate.c b/evaluate.c index ee1d69c53..c415773f4 100644 --- a/evaluate.c +++ b/evaluate.c @@ -2362,7 +2362,7 @@ static int printf_fmt_print_pointer(struct format_type *fmt, struct expression * // TODO TODO: fix this here!!! int ret; *target = &const_ptr_ctype; - ret =check_assignment_types(*target, expr, typediff); + ret = check_assignment_types(*target, expr, typediff); if (ret == 0) { /* if just printing, ignore address-space mismatches */ if (strcmp(*typediff, "different address spaces") == 0) @@ -2780,12 +2780,11 @@ static int evaluate_arguments(struct symbol *fn, struct expression_list *head) int i = 1; /* - * Do the va-arg format parsing here. This is done as the arugment + * Do the va-arg format parsing here. This is done as the argument * info may get lost or changed later on in the evaluation loop by * calls to degenerate() */ - if (Wformat && fn->ctype.format.index) fmt_string = get_printf_fmt(fn, head); @@ -2826,7 +2825,6 @@ static int evaluate_arguments(struct symbol *fn, struct expression_list *head) } END_FOR_EACH_PTR(expr); FINISH_PTR_LIST(argtype); - if (Wformat && fn->ctype.format.index) evaluate_format_printf(fmt_string, fn, head); -- 2.23.0