2 diff --git a/core/fpdfapi/font/cpdf_cidfont.cpp b/core/fpdfapi/font/cpdf_cidfont.cpp
3 index 7d2d549b8..c4864060a 100644
4 --- a/core/fpdfapi/font/cpdf_cidfont.cpp
5 +++ b/core/fpdfapi/font/cpdf_cidfont.cpp
6 @@ -754,7 +754,7 @@ int CPDF_CIDFont::GlyphFromCharCode(uint32_t charcode, bool* pVertGlyph) {
7 uint32_t maccode = CharCodeFromUnicodeForFreetypeEncoding(
8 FT_ENCODING_APPLE_ROMAN, name_unicode);
9 index = maccode ? FT_Get_Char_Index(face, maccode)
10 - : FT_Get_Name_Index(face, name);
11 + : FT_Get_Name_Index(face, const_cast<char*>(name));
13 if (index == 0 || index == 0xffff)
14 return charcode ? static_cast<int>(charcode) : -1;
15 diff --git a/core/fpdfapi/font/cpdf_truetypefont.cpp b/core/fpdfapi/font/cpdf_truetypefont.cpp
16 index f19ace9d0..562b015f0 100644
17 --- a/core/fpdfapi/font/cpdf_truetypefont.cpp
18 +++ b/core/fpdfapi/font/cpdf_truetypefont.cpp
19 @@ -90,7 +90,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap() {
20 FT_ENCODING_APPLE_ROMAN,
21 m_Encoding.UnicodeFromCharCode(charcode));
23 - m_GlyphIndex[charcode] = FT_Get_Name_Index(face, name);
24 + m_GlyphIndex[charcode] = FT_Get_Name_Index(face, const_cast<char*>(name));
26 m_GlyphIndex[charcode] = FT_Get_Char_Index(face, maccode);
28 @@ -104,7 +104,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap() {
29 m_GlyphIndex[charcode] = FT_Get_Char_Index(face, 32);
32 - m_GlyphIndex[charcode] = FT_Get_Name_Index(face, name);
33 + m_GlyphIndex[charcode] = FT_Get_Name_Index(face, const_cast<char*>(name));
34 if (m_GlyphIndex[charcode] != 0 || !bToUnicode)
37 diff --git a/core/fpdfapi/font/cpdf_type1font.cpp b/core/fpdfapi/font/cpdf_type1font.cpp
38 index 55510e7d7..2f13f00b8 100644
39 --- a/core/fpdfapi/font/cpdf_type1font.cpp
40 +++ b/core/fpdfapi/font/cpdf_type1font.cpp
41 @@ -263,7 +263,7 @@ void CPDF_Type1Font::LoadGlyphMap() {
42 static_cast<uint32_t>(charcode));
44 m_Encoding.SetUnicode(charcode, UnicodeFromAdobeName(name));
45 - m_GlyphIndex[charcode] = FT_Get_Name_Index(m_Font.GetFaceRec(), name);
46 + m_GlyphIndex[charcode] = FT_Get_Name_Index(m_Font.GetFaceRec(), const_cast<char*>(name));
48 m_GlyphIndex[charcode] = FT_Get_Char_Index(
49 m_Font.GetFaceRec(), static_cast<uint32_t>(charcode));
50 @@ -294,7 +294,7 @@ void CPDF_Type1Font::LoadGlyphMap() {
53 m_Encoding.SetUnicode(charcode, UnicodeFromAdobeName(name));
54 - m_GlyphIndex[charcode] = FT_Get_Name_Index(m_Font.GetFaceRec(), name);
55 + m_GlyphIndex[charcode] = FT_Get_Name_Index(m_Font.GetFaceRec(), const_cast<char*>(name));
56 if (m_GlyphIndex[charcode] != 0)
59 diff --git a/core/fpdfdoc/cpdf_metadata.cpp b/core/fpdfdoc/cpdf_metadata.cpp
60 index 31564f45f..5858549ef 100644
61 --- a/core/fpdfdoc/cpdf_metadata.cpp
62 +++ b/core/fpdfdoc/cpdf_metadata.cpp
63 @@ -87,7 +87,7 @@ std::vector<UnsupportedFeature> CPDF_Metadata::CheckForSharedForm() const {
64 CFX_XMLParser parser(stream);
65 std::unique_ptr<CFX_XMLDocument> doc = parser.Parse();
68 + return std::vector<UnsupportedFeature>();
70 std::vector<UnsupportedFeature> unsupported;
71 CheckForSharedFormInternal(/*depth=*/0, doc->GetRoot(), &unsupported);
72 diff --git a/core/fxcodec/jpx/cjpx_decoder.cpp b/core/fxcodec/jpx/cjpx_decoder.cpp
73 index 2e7a72aa1..65fb3deaa 100644
74 --- a/core/fxcodec/jpx/cjpx_decoder.cpp
75 +++ b/core/fxcodec/jpx/cjpx_decoder.cpp
76 @@ -74,7 +74,7 @@ absl::optional<OpjImageRgbData> alloc_rgb(size_t size) {
81 + return std::move(data);
84 void sycc_to_rgb(int offset,
85 diff --git a/third_party/base/containers/span.h b/third_party/base/containers/span.h
86 index 435fafa85..d8e8bfbc4 100644
87 --- a/third_party/base/containers/span.h
88 +++ b/third_party/base/containers/span.h
89 @@ -211,7 +211,7 @@ class TRIVIAL_ABI GSL_POINTER span {
91 template <typename Container,
92 typename = internal::EnableIfSpanCompatibleContainer<Container, T>>
93 - constexpr span(Container& container)
94 + span(Container& container)
95 : span(container.data(), container.size()) {}
98 @@ -225,7 +225,7 @@ class TRIVIAL_ABI GSL_POINTER span {
99 // Conversions from spans of compatible types: this allows a span<T> to be
100 // seamlessly used as a span<const T>, but not the other way around.
101 template <typename U, typename = internal::EnableIfLegalSpanConversion<U, T>>
102 - constexpr span(const span<U>& other) : span(other.data(), other.size()) {}
103 + span(const span<U>& other) : span(other.data(), other.size()) {}
104 span& operator=(const span& other) noexcept {
105 if (this != &other) {
107 diff --git a/third_party/base/numerics/safe_conversions_impl.h b/third_party/base/numerics/safe_conversions_impl.h
108 index 44c921a14..0152a89b7 100644
109 --- a/third_party/base/numerics/safe_conversions_impl.h
110 +++ b/third_party/base/numerics/safe_conversions_impl.h
111 @@ -89,7 +89,7 @@ constexpr typename std::make_unsigned<T>::type SafeUnsignedAbs(T value) {
113 // TODO(jschuh): Switch to std::is_constant_evaluated() once C++20 is supported.
114 // Alternately, the usage could be restructured for "consteval if" in C++23.
115 -#define IsConstantEvaluated() (__builtin_is_constant_evaluated())
116 +#define IsConstantEvaluated() (false)
118 // TODO(jschuh): Debug builds don't reliably propagate constants, so we restrict
119 // some accelerated runtime paths to release builds until this can be forced
120 diff --git a/third_party/libopenjpeg/openjpeg.c b/third_party/libopenjpeg/openjpeg.c
121 index 9dd4256d7..949d65830 100644
122 --- a/third_party/libopenjpeg/openjpeg.c
123 +++ b/third_party/libopenjpeg/openjpeg.c
124 @@ -358,7 +358,7 @@ OPJ_BOOL OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec,
128 -OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decoder_set_strict_mode(opj_codec_t *p_codec,
129 +OPJ_BOOL OPJ_CALLCONV opj_decoder_set_strict_mode(opj_codec_t *p_codec,