summaryrefslogtreecommitdiffstats
path: root/external/pdfium/build.patch.1
blob: fce8874af8bd2d66a0c75a69f8acb2365d2347d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
diff --git a/core/fpdfdoc/cpdf_metadata.cpp b/core/fpdfdoc/cpdf_metadata.cpp
index 323de4ffc..f11a0b0ad 100644
--- a/core/fpdfdoc/cpdf_metadata.cpp
+++ b/core/fpdfdoc/cpdf_metadata.cpp
@@ -74,7 +74,7 @@ std::vector<UnsupportedFeature> CPDF_Metadata::CheckForSharedForm() const {
   CFX_XMLParser parser(stream);
   std::unique_ptr<CFX_XMLDocument> doc = parser.Parse();
   if (!doc)
-    return {};
+    return std::vector<UnsupportedFeature>();
 
   std::vector<UnsupportedFeature> unsupported;
   CheckForSharedFormInternal(doc->GetRoot(), &unsupported);
diff --git a/third_party/base/span.h b/third_party/base/span.h
index 0fb627ba8..f71c362e2 100644
--- a/third_party/base/span.h
+++ b/third_party/base/span.h
@@ -214,7 +214,7 @@ class span {
   // Conversions from spans of compatible types: this allows a span<T> to be
   // seamlessly used as a span<const T>, but not the other way around.
   template <typename U, typename = internal::EnableIfLegalSpanConversion<U, T>>
-  constexpr span(const span<U>& other) : span(other.data(), other.size()) {}
+  span(const span<U>& other) : span(other.data(), other.size()) {}
   span& operator=(const span& other) noexcept = default;
   ~span() noexcept {
     if (!size_) {
diff --git a/third_party/base/span.h b/third_party/base/span.h
index 0fb627ba8..dda1fc8bc 100644
--- a/third_party/base/span.h
+++ b/third_party/base/span.h
@@ -204,7 +204,7 @@ class span {
   // size()|.
   template <typename Container,
             typename = internal::EnableIfSpanCompatibleContainer<Container, T>>
-  constexpr span(Container& container)
+  span(Container& container)
       : span(container.data(), container.size()) {}
   template <
       typename Container,
diff --git a/core/fxcodec/jpx/cjpx_decoder.cpp b/core/fxcodec/jpx/cjpx_decoder.cpp
index c66985a7f..817f81dfa 100644
--- a/core/fxcodec/jpx/cjpx_decoder.cpp
+++ b/core/fxcodec/jpx/cjpx_decoder.cpp
@@ -71,7 +71,7 @@ Optional<OpjImageRgbData> alloc_rgb(size_t size) {
   if (!data.b)
     return pdfium::nullopt;
 
-  return data;
+  return std::move(data);
 }
 
 void sycc_to_rgb(int offset,
diff --git a/core/fdrm/fx_crypt_aes.cpp b/core/fdrm/fx_crypt_aes.cpp
index f2170220b..ede18f581 100644
--- a/core/fdrm/fx_crypt_aes.cpp
+++ b/core/fdrm/fx_crypt_aes.cpp
@@ -437,7 +437,7 @@ const unsigned int D3[256] = {
   (block[0] ^= *keysched++, block[1] ^= *keysched++, block[2] ^= *keysched++, \
    block[3] ^= *keysched++)
 #define MOVEWORD(i) (block[i] = newstate[i])
-#define MAKEWORD(i)                                         \
+#define FMAKEWORD(i)                                         \
   (newstate[i] = (E0[(block[i] >> 24) & 0xFF] ^             \
                   E1[(block[(i + C1) % Nb] >> 16) & 0xFF] ^ \
                   E2[(block[(i + C2) % Nb] >> 8) & 0xFF] ^  \
@@ -458,10 +458,10 @@ void aes_encrypt_nb_4(CRYPT_aes_context* ctx, unsigned int* block) {
   unsigned int newstate[4];
   for (i = 0; i < ctx->Nr - 1; i++) {
     ADD_ROUND_KEY_4();
-    MAKEWORD(0);
-    MAKEWORD(1);
-    MAKEWORD(2);
-    MAKEWORD(3);
+    FMAKEWORD(0);
+    FMAKEWORD(1);
+    FMAKEWORD(2);
+    FMAKEWORD(3);
     MOVEWORD(0);
     MOVEWORD(1);
     MOVEWORD(2);
@@ -478,10 +478,10 @@ void aes_encrypt_nb_4(CRYPT_aes_context* ctx, unsigned int* block) {
   MOVEWORD(3);
   ADD_ROUND_KEY_4();
 }
-#undef MAKEWORD
+#undef FMAKEWORD
 #undef LASTWORD
 
-#define MAKEWORD(i)                                         \
+#define FMAKEWORD(i)                                         \
   (newstate[i] = (D0[(block[i] >> 24) & 0xFF] ^             \
                   D1[(block[(i + C1) % Nb] >> 16) & 0xFF] ^ \
                   D2[(block[(i + C2) % Nb] >> 8) & 0xFF] ^  \
@@ -502,10 +502,10 @@ void aes_decrypt_nb_4(CRYPT_aes_context* ctx, unsigned int* block) {
   unsigned int newstate[4];
   for (i = 0; i < ctx->Nr - 1; i++) {
     ADD_ROUND_KEY_4();
-    MAKEWORD(0);
-    MAKEWORD(1);
-    MAKEWORD(2);
-    MAKEWORD(3);
+    FMAKEWORD(0);
+    FMAKEWORD(1);
+    FMAKEWORD(2);
+    FMAKEWORD(3);
     MOVEWORD(0);
     MOVEWORD(1);
     MOVEWORD(2);
@@ -522,7 +522,7 @@ void aes_decrypt_nb_4(CRYPT_aes_context* ctx, unsigned int* block) {
   MOVEWORD(3);
   ADD_ROUND_KEY_4();
 }
-#undef MAKEWORD
+#undef FMAKEWORD
 #undef LASTWORD
 
 void aes_setup(CRYPT_aes_context* ctx, const unsigned char* key, int keylen) {