Skip to content

Commit f270682

Browse files
committed
Fix gcc 15 deprecated warnings
1 parent 8895638 commit f270682

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

TODO.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
# CppCommon todo
2-
test

source/system/environment.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
#include "string/encoding.h"
1212
#include "utility/resource.h"
1313

14+
#if defined(__GNUC__)
15+
#pragma GCC diagnostic push
16+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // GCC: warning: 'wstring_convert' is deprecated
17+
#endif
18+
1419
#include <codecvt>
1520
#include <cstring>
1621
#include <locale>
@@ -513,3 +518,7 @@ void Environment::ClearEnvar(const std::string name)
513518
}
514519

515520
} // namespace CppCommon
521+
522+
#if defined(__GNUC__)
523+
#pragma GCC diagnostic pop
524+
#endif

0 commit comments

Comments
 (0)