Created
April 25, 2015 10:13
-
-
Save theirix/926b7ffcc99eb01174e0 to your computer and use it in GitHub Desktop.
0001-Fixed-build-and-runtime-tidy-errors.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 2aad6eb0337498fff3e411f514539218d686b8e5 Mon Sep 17 00:00:00 2001 | |
From: theirix <theirix@gmail.com> | |
Date: Sat, 25 Apr 2015 13:01:47 +0300 | |
Subject: [PATCH] Fixed build and runtime tidy errors | |
1. Replaced explicit TidyBuffer init with proper function call. | |
This prevents known error https://cl.ly/WwyM | |
2. Fixed runtime issue with Init/Bool tidy parameter | |
Tested with tidy 20090325 on OS X (debian uses 20091223). | |
--- | |
src/util.cpp | 9 ++++++--- | |
1 file changed, 6 insertions(+), 3 deletions(-) | |
diff --git a/src/util.cpp b/src/util.cpp | |
index 0a81d4e..2af247f 100644 | |
--- a/src/util.cpp | |
+++ b/src/util.cpp | |
@@ -286,14 +286,17 @@ QString tidyHtml(QString str, bool& ok) { | |
ok = false; | |
TidyDoc tdoc = tidyCreate(); | |
- TidyBuffer output = {0, 0, 0, 0, 0}; | |
- TidyBuffer errbuf = {0, 0, 0, 0, 0}; | |
+ TidyBuffer output; | |
+ TidyBuffer errbuf; | |
+ | |
+ tidyBufInit(&output); | |
+ tidyBufInit(&errbuf); | |
bool configOk = | |
tidyOptSetBool(tdoc, TidyXhtmlOut, yes) && | |
tidyOptSetBool(tdoc, TidyForceOutput, yes) && | |
tidyOptSetBool(tdoc, TidyMark, no) && | |
- tidyOptSetInt(tdoc, TidyBodyOnly, yes) && | |
+ tidyOptSetBool(tdoc, TidyBodyOnly, yes) && | |
tidyOptSetInt(tdoc, TidyWrapLen, 0) && | |
tidyOptSetInt(tdoc, TidyDoctypeMode, TidyDoctypeOmit); | |
-- | |
2.3.6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment