summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-06-20 09:57:23 -0700
committerGitHub <noreply@github.com>2024-06-20 09:57:23 -0700
commit98da69f2ee63214a4f946d55b863ee6d41d3e250 (patch)
tree62c977fbabc1e36eb1c1c64b7ca8031f2d56b758
parent765c61445550c6e4ecfd250e1893d776d570b4fd (diff)
downloadbinaryen-98da69f2ee63214a4f946d55b863ee6d41d3e250.tar.gz
binaryen-98da69f2ee63214a4f946d55b863ee6d41d3e250.tar.bz2
binaryen-98da69f2ee63214a4f946d55b863ee6d41d3e250.zip
[NFC] Add pragma to ignore maybe-uninitialized in strings.cpp (#6686)
This will hopefully fix the build on the coverage builder.
-rw-r--r--src/support/string.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/support/string.cpp b/src/support/string.cpp
index 01fe4e522..7dc9ba89c 100644
--- a/src/support/string.cpp
+++ b/src/support/string.cpp
@@ -318,6 +318,9 @@ std::ostream& writeWTF16CodePoint(std::ostream& os, uint32_t u) {
return os;
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+
bool convertWTF8ToWTF16(std::ostream& os, std::string_view str) {
bool valid = true;
bool lastWasLeadingSurrogate = false;
@@ -343,6 +346,8 @@ bool convertWTF8ToWTF16(std::ostream& os, std::string_view str) {
return valid;
}
+#pragma GCC diagnostic pop
+
bool convertWTF16ToWTF8(std::ostream& os, std::string_view str) {
return doConvertWTF16ToWTF8(os, str, true);
}