From: Daniel Stenberg Date: Fri, 15 Oct 2021 06:02:48 +0000 (+0200) Subject: examples/htmltidy: correct wrong printf() use X-Git-Tag: curl-7_80_0~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b75045aa12a96411649a16b4703c4293ff7c16bd;p=thirdparty%2Fcurl.git examples/htmltidy: correct wrong printf() use ... and update the includes to match how current htmltidy wants them used. Reported-by: Stathis Kapnidis Fixes #7860 Closes #7861 --- diff --git a/docs/examples/htmltidy.c b/docs/examples/htmltidy.c index be5350cd4d..d250cb9de5 100644 --- a/docs/examples/htmltidy.c +++ b/docs/examples/htmltidy.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2021, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -28,8 +28,8 @@ */ #include -#include -#include +#include +#include #include /* curl write callback, to fill tidy's input buffer... */ @@ -53,7 +53,7 @@ void dumpNode(TidyDoc doc, TidyNode tnod, int indent) printf("%*.*s%s ", indent, indent, "<", name); /* walk the attribute list */ for(attr = tidyAttrFirst(child); attr; attr = tidyAttrNext(attr) ) { - printf(tidyAttrName(attr)); + printf("%s", tidyAttrName(attr)); tidyAttrValue(attr)?printf("=\"%s\" ", tidyAttrValue(attr)):printf(" "); }