mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 00:52:18 +01:00
example/jsonfindptrs: avoid g++ uninitialized warn
This commit is contained in:
1 parent
05f4c37964
commit
97cd8d8e8a
1 file changed
+9
@@ -508,7 +508,16 @@ class Callbacks : public wuffs_aux::DecodeJsonCallbacks {
|
|||||||
m_stack.push_back(JsonValue(static_cast<JsonVector*>(nullptr)));
|
m_stack.push_back(JsonValue(static_cast<JsonVector*>(nullptr)));
|
||||||
return "";
|
return "";
|
||||||
} else if (flags & WUFFS_BASE__TOKEN__VBD__STRUCTURE__TO_DICT) {
|
} else if (flags & WUFFS_BASE__TOKEN__VBD__STRUCTURE__TO_DICT) {
|
||||||
|
// Avoid a g++ -O3 -Wall -Werror "maybe uninitialized" false positive:
|
||||||
|
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109448#c6
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||||
|
#endif
|
||||||
m_stack.push_back(JsonValue(static_cast<JsonMap*>(nullptr)));
|
m_stack.push_back(JsonValue(static_cast<JsonMap*>(nullptr)));
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
return "main: internal error: bad push";
|
return "main: internal error: bad push";
|
||||||
|
|||||||
Reference in new issue
Block a user