Bug 1732208 - Silence the unused-but-set-variable warning in parser. r=hsivonen

parser/html/nsHtml5StreamParser.cpp:1046:10: error: variable 'totalRead' set but not used [-Werror,-Wunused-but-set-variable]
  size_t totalRead = 0;
         ^

Differential Revision: https://phabricator.services.mozilla.com/D126458
This commit is contained in:
Mike Hommey
2021-09-28 00:02:47 +00:00
parent e656785fa4
commit 6bdbf3f46e

View File

@@ -1076,6 +1076,7 @@ nsresult nsHtml5StreamParser::WriteStreamBytes(
} else {
MOZ_ASSERT(totalRead == aFromSegment.Length(),
"The Unicode decoder consumed the wrong number of bytes.");
(void)totalRead;
if (mDecodingLocalFileWithoutTokenizing &&
mLocalFileBytesBuffered == LOCAL_FILE_UTF_8_BUFFER_SIZE) {
auto encoding = mEncoding;