summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_page
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2014-07-29 10:13:17 -0700
committerNico Weber <thakis@chromium.org>2014-07-29 10:13:17 -0700
commit6c55495fcaf634e7f788f4dfe77fa1a106c9cd55 (patch)
tree3fe8612d47f51ff551e480a2088a48349cd9bdf7 /core/src/fpdfapi/fpdf_page
parentc77e8f73397613f278eaeef2cae44debc6a684c8 (diff)
downloadpdfium-6c55495fcaf634e7f788f4dfe77fa1a106c9cd55.tar.xz
Fix a few more warnings in chromium_code mode.
No intended behavior change. - Remove more unused variables, functions, member variables. - Put a few constructor initializers in the order they execute in. - Add braces for subobject initializers. - Fix a handful of signed / unsigned comparisons. BUG=pdfium:29 R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/429593005
Diffstat (limited to 'core/src/fpdfapi/fpdf_page')
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp3
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp1
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp2
4 files changed, 0 insertions, 10 deletions
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
index 500fe4a57f..6d3cf29785 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
@@ -313,7 +313,6 @@ void CPDF_TextObject::SetText(int nChars, FX_DWORD* pCharCodes, FX_FLOAT* pKerni
}
}
} else {
- int offset = 0;
m_pCharCodes = (FX_DWORD*)(FX_UINTPTR)pCharCodes[0];
}
RecalcPositionData();
@@ -354,7 +353,6 @@ FX_FLOAT CPDF_TextObject::GetSpaceCharWidth() const
}
void CPDF_TextObject::GetCharRect(int index, CFX_FloatRect& rect) const
{
- FX_FLOAT curpos = 0;
CPDF_Font* pFont = m_TextState.GetFont();
FX_BOOL bVertWriting = FALSE;
CPDF_CIDFont* pCIDFont = pFont->GetCIDFont();
@@ -526,8 +524,6 @@ void CPDF_TextObject::CalcPositionData(FX_FLOAT* pTextAdvanceX, FX_FLOAT* pTextA
}
void CPDF_TextObject::CalcCharPos(FX_FLOAT* pPosArray) const
{
- FX_FLOAT curpos = 0;
- int count = 0;
CPDF_Font* pFont = m_TextState.GetFont();
FX_BOOL bVertWriting = FALSE;
CPDF_CIDFont* pCIDFont = pFont->GetCIDFont();
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
index 467fb63f47..1b7cb03ee2 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
@@ -785,9 +785,6 @@ FX_BOOL CPDF_IndexedCS::v_Load(CPDF_Document* pDoc, CPDF_Array* pArray)
if (pTableObj == NULL) {
return FALSE;
}
- FX_LPCBYTE pTable = NULL;
- FX_DWORD size = 0;
- CPDF_StreamAcc* pStreamAcc = NULL;
if (pTableObj->GetType() == PDFOBJ_STRING) {
m_Table = ((CPDF_String*)pTableObj)->GetString();
} else if (pTableObj->GetType() == PDFOBJ_STREAM) {
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp
index c152b223c9..097bd61e6c 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp
@@ -146,7 +146,6 @@ CPDF_DocPageData::~CPDF_DocPageData()
{
Clear(FALSE);
Clear(TRUE);
- FX_POSITION pos = NULL;
}
void CPDF_DocPageData::Clear(FX_BOOL bRelease)
{
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index 5e8c1b5ec3..7d8bd4842a 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -619,11 +619,9 @@ void CPDF_StreamContentParser::Handle_ConcatMatrix()
{
FX_FLOAT a2 = GetNumber16(5), b2 = GetNumber16(4), c2 = GetNumber16(3), d2 = GetNumber16(2);
FX_FLOAT e2 = GetNumber(1), f2 = GetNumber(0);
- FX_FLOAT old_width_scale = m_pCurStates->m_CTM.GetXUnit();
CFX_AffineMatrix new_matrix(a2, b2, c2, d2, e2, f2);
new_matrix.Concat(m_pCurStates->m_CTM);
m_pCurStates->m_CTM = new_matrix;
- FX_FLOAT new_width_scale = m_pCurStates->m_CTM.GetXUnit();
OnChangeTextMatrix();
}
void CPDF_StreamContentParser::Handle_SetColorSpace_Fill()