Skip to content

Commit 3a72e1c

Browse files
authored
Merge pull request #3 from dhthwy/fix_uninit_warning
Fix warning for GCC 14
2 parents ba5eac5 + 252619d commit 3a72e1c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/lib_json/json_value.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,10 +433,19 @@ Value::Value(const Value& other) {
433433
dupMeta(other);
434434
}
435435

436+
#if defined(__GNUC__) && __GNUC__ > 13
437+
#pragma GCC diagnostic push
438+
#pragma GCC diagnostic ignored "-Wuninitialized"
439+
#endif
440+
436441
Value::Value(Value&& other) noexcept {
437442
initBasic(nullValue);
438443
swap(other);
439444
}
445+
446+
#if defined(__GNUC__) && __GNUC__ > 13
447+
#pragma GCC diagnostic pop
448+
#endif
440449

441450
Value::~Value() {
442451
releasePayload();

0 commit comments

Comments
 (0)