summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp2
-rw-r--r--third_party/agg23/0001-gcc-warning.patch17
-rw-r--r--third_party/agg23/README.pdfium2
-rw-r--r--third_party/agg23/agg_path_storage.h6
4 files changed, 23 insertions, 4 deletions
diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
index 72f67dd271..4b44669c0d 100644
--- a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
+++ b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
@@ -354,7 +354,7 @@ FX_BOOL CPDFXFA_Document::GetPopupPos(CXFA_FFWidget* hWidget,
CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
if (!pEnv)
return FALSE;
- FS_RECTF pageViewRect;
+ FS_RECTF pageViewRect = {0.0f, 0.0f, 0.0f, 0.0f};
pEnv->FFI_GetPageViewRect(pPage, pageViewRect);
CFX_FloatRect rcAnchor;
diff --git a/third_party/agg23/0001-gcc-warning.patch b/third_party/agg23/0001-gcc-warning.patch
new file mode 100644
index 0000000000..759696ef03
--- /dev/null
+++ b/third_party/agg23/0001-gcc-warning.patch
@@ -0,0 +1,17 @@
+diff --git a/third_party/agg23/agg_path_storage.h b/third_party/agg23/agg_path_storage.h
+index dc13851..7f21bac 100644
+--- a/third_party/agg23/agg_path_storage.h
++++ b/third_party/agg23/agg_path_storage.h
+@@ -38,9 +38,9 @@ public:
+ }
+ unsigned vertex(FX_FLOAT* x, FX_FLOAT* y)
+ {
+- return (m_vertex_idx < m_path->total_vertices()) ?
+- m_path->vertex(m_vertex_idx++, x, y) :
+- path_cmd_stop;
++ return (m_vertex_idx < m_path->total_vertices())
++ ? m_path->vertex(m_vertex_idx++, x, y)
++ : static_cast<unsigned>(path_cmd_stop);
+ }
+ private:
+ const path_storage* m_path;
diff --git a/third_party/agg23/README.pdfium b/third_party/agg23/README.pdfium
index 54687934b6..3b73d4d4d3 100644
--- a/third_party/agg23/README.pdfium
+++ b/third_party/agg23/README.pdfium
@@ -12,3 +12,5 @@ Local Modifications:
0000-bug-466.patch: Fixes an infinite loop in stroke_calc_arc().
Various changes to use FX_ library functions.
Possibly more?
+0001-gcc-warning.patch: Fix a GCC warning about both enumeral and
+non-enumeral type in conditional.
diff --git a/third_party/agg23/agg_path_storage.h b/third_party/agg23/agg_path_storage.h
index dc13851d09..7f21bacd09 100644
--- a/third_party/agg23/agg_path_storage.h
+++ b/third_party/agg23/agg_path_storage.h
@@ -38,9 +38,9 @@ public:
}
unsigned vertex(FX_FLOAT* x, FX_FLOAT* y)
{
- return (m_vertex_idx < m_path->total_vertices()) ?
- m_path->vertex(m_vertex_idx++, x, y) :
- path_cmd_stop;
+ return (m_vertex_idx < m_path->total_vertices())
+ ? m_path->vertex(m_vertex_idx++, x, y)
+ : static_cast<unsigned>(path_cmd_stop);
}
private:
const path_storage* m_path;