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
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp index 9eec7aa..fd94b88 100644 --- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp +++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
@@ -544,8 +544,8 @@ } CPDF_XRefStream::CPDF_XRefStream() : m_PrevOffset(0) - , m_iSeg(0) , m_dwTempObjNum(0) + , m_iSeg(0) { } FX_BOOL CPDF_XRefStream::Start()
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp index 9985f06..2dd2911 100644 --- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp +++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
@@ -685,7 +685,7 @@ pBaseDict->SetAtName(FX_BSTRC("Encoding"), "WinAnsiEncoding"); } else { flags |= PDFFONT_NONSYMBOLIC; - int i; + size_t i; for (i = 0; i < sizeof g_FX_CharsetUnicodes / sizeof(FX_CharsetUnicodes); i ++) { charSets.RemoveAll(); charSets.Add(g_FX_CharsetUnicodes[i].m_Charset); @@ -913,7 +913,7 @@ } } else { flags |= PDFFONT_NONSYMBOLIC; - int i; + size_t i; for (i = 0; i < sizeof g_FX_CharsetUnicodes / sizeof(FX_CharsetUnicodes); i ++) if (g_FX_CharsetUnicodes[i].m_Charset == charset) { break;
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp index b7ca5b1..36b6ce2 100644 --- a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp +++ b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
@@ -995,7 +995,7 @@ } if (m_Flags & PDFFONT_ALLCAP) { unsigned char lowercases[] = {'a', 'z', 0xe0, 0xf6, 0xf8, 0xfd}; - for (int range = 0; range < sizeof lowercases / 2; range ++) { + for (size_t range = 0; range < sizeof lowercases / 2; range ++) { for (int i = lowercases[range * 2]; i <= lowercases[range * 2 + 1]; i ++) { if (m_GlyphIndex[i] != 0xffff && m_pFontFile != NULL) { continue;
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font_utility.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font_utility.cpp index b10bff7..d7c725c 100644 --- a/core/src/fpdfapi/fpdf_font/fpdf_font_utility.cpp +++ b/core/src/fpdfapi/fpdf_font/fpdf_font_utility.cpp
@@ -22,7 +22,7 @@ return NULL; } FX_BYTE buf[256]; - size_t read = FXSYS_fread(buf, 1, 20, file); + FXSYS_fread(buf, 1, 20, file); if (*(FX_DWORD*)buf != 0x43465846) { FXSYS_fclose(file); return NULL; @@ -45,15 +45,14 @@ FXFC_PACKAGE* pPackage = (FXFC_PACKAGE*)p; FXSYS_fseek(pPackage->m_pFile, pPackage->m_IndexOffset, FXSYS_SEEK_SET); FX_BYTE buf[128]; - size_t read = 0; for (int i = 0; i < pPackage->m_nFiles; i ++) { - read = FXSYS_fread(buf, pPackage->m_IndexSize, 1, pPackage->m_pFile); + FXSYS_fread(buf, pPackage->m_IndexSize, 1, pPackage->m_pFile); if (FXSYS_stricmp((FX_LPCSTR)buf, name) == 0) { FX_DWORD offset = *(FX_DWORD*)&buf[64]; size = *(FX_DWORD*)&buf[68]; pBuffer = FX_Alloc(FX_BYTE, size); FXSYS_fseek(pPackage->m_pFile, offset, FXSYS_SEEK_SET); - read = FXSYS_fread(pBuffer, size, 1, pPackage->m_pFile); + FXSYS_fread(pBuffer, size, 1, pPackage->m_pFile); if (buf[72]) { FX_DWORD orig_size; FX_LPBYTE comp_buf = pBuffer;
diff --git a/core/src/fpdfapi/fpdf_font/ttgsubtable.h b/core/src/fpdfapi/fpdf_font/ttgsubtable.h index 26f67fb..cc7f8c8 100644 --- a/core/src/fpdfapi/fpdf_font/ttgsubtable.h +++ b/core/src/fpdfapi/fpdf_font/ttgsubtable.h
@@ -22,8 +22,8 @@ class CFX_CTTGSUBTable : public CFX_Object { public: - CFX_CTTGSUBTable(void): loaded(false), m_bFeautureMapLoad(FALSE) {}; - CFX_CTTGSUBTable(FT_Bytes gsub): loaded(false), m_bFeautureMapLoad(FALSE) + CFX_CTTGSUBTable(void): m_bFeautureMapLoad(FALSE), loaded(false) {}; + CFX_CTTGSUBTable(FT_Bytes gsub): m_bFeautureMapLoad(FALSE), loaded(false) { LoadGSUBTable(gsub); } @@ -274,7 +274,7 @@ struct TSingleSubstFormat1: public TSubTableBase { TCoverageFormatBase *Coverage; TT_int16_t DeltaGlyphID; - TSingleSubstFormat1(): DeltaGlyphID(0), Coverage(NULL) + TSingleSubstFormat1(): Coverage(NULL), DeltaGlyphID(0) { SubstFormat = 1; }
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp index 500fe4a..6d3cf29 100644 --- a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp +++ b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
@@ -313,7 +313,6 @@ } } } else { - int offset = 0; m_pCharCodes = (FX_DWORD*)(FX_UINTPTR)pCharCodes[0]; } RecalcPositionData(); @@ -354,7 +353,6 @@ } 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::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 467fb63..1b7cb03 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 @@ 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 c152b22..097bd61 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 @@ { 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 5e8c1b5..7d8bd48 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 @@ { 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()
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp index 9dddd86..3dc0e55 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp
@@ -106,7 +106,6 @@ static FX_BOOL _LoadCryptInfo(CPDF_Dictionary* pEncryptDict, FX_BSTR name, int& cipher, int& keylen) { int Version = pEncryptDict->GetInteger(FX_BSTRC("V")); - int Revision = pEncryptDict->GetInteger(FX_BSTRC("R")); cipher = FXCIPHER_RC4; keylen = 0; if (Version >= 4) {
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp index 26877ec..1137007 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
@@ -1269,7 +1269,7 @@ if (n == 1) { size = totalsize - (thisoff + offset); } else { - FX_DWORD nextnum = syntax.GetDirectNum(); + syntax.GetDirectNum(); // Skip nextnum. FX_DWORD nextoff = syntax.GetDirectNum(); size = nextoff - thisoff; }
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp index eb08bca..45b6970 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp
@@ -171,16 +171,16 @@ m_nCacheSize = pImageCache->EstimateSize() - oldsize; } CPDF_ImageCache::CPDF_ImageCache(CPDF_Document* pDoc, CPDF_Stream* pStream) - : m_pDocument(pDoc) - , m_pStream(pStream) - , m_pCachedBitmap(NULL) - , m_pCachedMask(NULL) - , m_dwCacheSize(0) - , m_dwTimeCount(0) + : m_dwTimeCount(0) , m_pCurBitmap(NULL) , m_pCurMask(NULL) , m_MatteColor(0) , m_pRenderStatus(NULL) + , m_pDocument(pDoc) + , m_pStream(pStream) + , m_pCachedBitmap(NULL) + , m_pCachedMask(NULL) + , m_dwCacheSize(0) { } CPDF_ImageCache::~CPDF_ImageCache()
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp index 81cff01..7f442eb 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
@@ -945,7 +945,6 @@ if (m_bDefaultDecode) { if (m_Family == PDFCS_DEVICERGB || m_Family == PDFCS_CALRGB) { if (m_bpc == 16) { - FX_LPBYTE dest_pos = dest_scan; FX_LPCBYTE src_pos = src_scan; for (int col = 0; col < m_Width; col ++) { *dest_scan++ = src_pos[4]; @@ -954,7 +953,6 @@ src_pos += 6; } } else if (m_bpc == 8) { - FX_LPBYTE dest_pos = dest_scan; FX_LPCBYTE src_pos = src_scan; for (int column = 0; column < m_Width; column ++) { *dest_scan++ = src_pos[2]; @@ -1360,7 +1358,6 @@ if (src_x % 2) { src_bit_pos = 4; } - int value = (1 << bpc) - 1; for (FX_DWORD i = 0; i < m_nComponents; i ++) { temp[i] = (FX_BYTE)(_GetBits8(pSrcPixel, src_bit_pos, bpc) * unit_To8Bpc); src_bit_pos += bpc;
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp index ba0ca84..7ffd186 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
@@ -71,7 +71,6 @@ rgb_array[i] = FXARGB_TODIB(FXARGB_MAKE(alpha, FXSYS_round(R * 255), FXSYS_round(G * 255), FXSYS_round(B * 255))); } int pitch = pBitmap->GetPitch(); - int Bpp = pBitmap->GetBPP() / 8; for (int row = 0; row < height; row ++) { FX_DWORD* dib_buf = (FX_DWORD*)(pBitmap->GetBuffer() + row * pitch); for (int column = 0; column < width; column ++) { @@ -156,7 +155,6 @@ int width = pBitmap->GetWidth(); int height = pBitmap->GetHeight(); int pitch = pBitmap->GetPitch(); - int Bpp = pBitmap->GetBPP() / 8; FX_BOOL bDecreasing = FALSE; if (start_r > end_r) { int length = (int)FXSYS_sqrt((FXSYS_Mul(start_x - end_x, start_x - end_x) + FXSYS_Mul(start_y - end_y, start_y - end_y))); @@ -245,7 +243,6 @@ int width = pBitmap->GetWidth(); int height = pBitmap->GetHeight(); int pitch = pBitmap->GetPitch(); - int Bpp = pBitmap->GetBPP() / 8; int total_results = 0; for (int j = 0; j < nFuncs; j ++) { if (pFuncs[j]) { @@ -743,8 +740,6 @@ void CPDF_RenderStatus::DrawShading(CPDF_ShadingPattern* pPattern, CFX_AffineMatrix* pMatrix, FX_RECT& clip_rect, int alpha, FX_BOOL bAlphaMode) { - int width = clip_rect.Width(); - int height = clip_rect.Height(); CPDF_Function** pFuncs = pPattern->m_pFunctions; int nFuncs = pPattern->m_nFuncs; CPDF_Dictionary* pDict = pPattern->m_pShadingObj->GetDict();
diff --git a/core/src/fpdfdoc/doc_form.cpp b/core/src/fpdfdoc/doc_form.cpp index c1e4152..821b998 100644 --- a/core/src/fpdfdoc/doc_form.cpp +++ b/core/src/fpdfdoc/doc_form.cpp
@@ -1492,10 +1492,10 @@ FX_LPCSTR m_name; FX_INT32 m_codePage; } g_fieldEncoding[] = { - "BigFive", 950, - "GBK", 936, - "Shift-JIS", 932, - "UHC", 949, + { "BigFive", 950 }, + { "GBK", 936 }, + { "Shift-JIS", 932 }, + { "UHC", 949 }, }; static void FPDFDOC_FDF_GetFieldValue(CPDF_Dictionary *pFieldDict, CFX_WideString &csValue, CFX_ByteString &bsEncoding) {
diff --git a/core/src/fpdfdoc/doc_vt.cpp b/core/src/fpdfdoc/doc_vt.cpp index 9de9ffd..09fa2bf 100644 --- a/core/src/fpdfdoc/doc_vt.cpp +++ b/core/src/fpdfdoc/doc_vt.cpp
@@ -815,7 +815,6 @@ m_nCharArray(0), m_nAlignment(0), m_fCharSpace(0.0f), - m_fWordSpace(0.0f), m_fFontSize(0.0f), m_nHorzScale(100), m_wSubWord(0),
diff --git a/core/src/fpdfdoc/pdf_vt.h b/core/src/fpdfdoc/pdf_vt.h index 0f74cef..09ed0b0 100644 --- a/core/src/fpdfdoc/pdf_vt.h +++ b/core/src/fpdfdoc/pdf_vt.h
@@ -603,14 +603,11 @@ FX_FLOAT m_fCharSpace; FX_INT32 m_nHorzScale; FX_WORD m_wSubWord; - FX_FLOAT m_fWordSpace; FX_FLOAT m_fFontSize; private: FX_BOOL m_bInitial; FX_BOOL m_bRichText; - FX_FLOAT m_fCaretOriginX; - FX_INT32 m_nCurFontIndex; IPDF_VariableText_Provider * m_pVTProvider; CPDF_VariableText_Iterator * m_pVTIterator; };
diff --git a/core/src/fpdftext/fpdf_text_search.cpp b/core/src/fpdftext/fpdf_text_search.cpp index 8c81ad9..3bd6450 100644 --- a/core/src/fpdftext/fpdf_text_search.cpp +++ b/core/src/fpdftext/fpdf_text_search.cpp
@@ -136,13 +136,9 @@ } FX_BOOL CPDF_TextStream::ProcessObject(const CPDF_TextObject* pObj, FX_BOOL bFirstLine) { - if(pObj->m_Bottom > 380 && pObj->m_Left < 45 && pObj->m_Top < 402) { - int i = 0; - } CPDF_Font* pFont = pObj->GetFont(); CFX_AffineMatrix matrix; pObj->GetTextMatrix(&matrix); - FX_FLOAT fs = pObj->GetFontSize(); int item_index = 0; if (m_pLastObj) { int result = FPDFText_ProcessInterObj(m_pLastObj, pObj);
diff --git a/core/src/fxcodec/codec/fx_codec_jpeg.cpp b/core/src/fxcodec/codec/fx_codec_jpeg.cpp index 37399f8..ac4be23 100644 --- a/core/src/fxcodec/codec/fx_codec_jpeg.cpp +++ b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
@@ -82,59 +82,6 @@ } return FALSE; } -static FX_BOOL _JpegLoadIccProfile(j_decompress_ptr cinfo, FX_LPBYTE* icc_buf_ptr, FX_DWORD* icc_length) -{ - if(icc_buf_ptr == NULL || icc_length == NULL) { - return FALSE; - } - *icc_buf_ptr = NULL; - *icc_length = 0; - FX_LPBYTE icc_data_ptr = NULL; - FX_DWORD icc_data_len = 0; - FX_BYTE count_icc_marker = 0; - FX_BYTE num_icc_marker = 0; - jpeg_saved_marker_ptr marker_list[256] = {NULL}; - for (jpeg_saved_marker_ptr cur_marker = cinfo->marker_list; - cur_marker != NULL; - cur_marker = cur_marker->next) { - if(_JpegIsIccMarker(cur_marker)) { - if(count_icc_marker == 0) { - num_icc_marker = cur_marker->data[13]; - } else if(num_icc_marker != cur_marker->data[13]) { - return FALSE; - } - int sn = cur_marker->data[12] - 1; - if(sn < 0 || sn >= num_icc_marker) { - return FALSE; - } - if(marker_list[sn] == NULL) { - marker_list[sn] = cur_marker; - } else { - return FALSE; - } - count_icc_marker ++; - icc_data_len += (cur_marker->data_length - JPEG_OVERHEAD_LEN); - } - } - if(count_icc_marker != num_icc_marker) { - return FALSE; - } - if(num_icc_marker == 0) { - return TRUE; - } - icc_data_ptr = FX_Alloc(FX_BYTE, icc_data_len); - if(icc_buf_ptr == NULL) { - return FALSE; - } - *icc_buf_ptr = icc_data_ptr; - *icc_length = icc_data_len; - for (int idx = 0; idx < num_icc_marker; idx++) { - icc_data_len = marker_list[idx]->data_length - JPEG_OVERHEAD_LEN; - FXSYS_memcpy32(icc_data_ptr, marker_list[idx]->data + JPEG_OVERHEAD_LEN, icc_data_len); - icc_data_ptr += icc_data_len; - } - return TRUE; -} static FX_BOOL _JpegEmbedIccProfile(j_compress_ptr cinfo, FX_LPCBYTE icc_buf_ptr, FX_DWORD icc_length) { if(icc_buf_ptr == NULL || icc_length == 0) {
diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp index f5d378d..4c99765 100644 --- a/core/src/fxge/ge/fx_ge_fontmap.cpp +++ b/core/src/fxge/ge/fx_ge_fontmap.cpp
@@ -859,11 +859,11 @@ FX_INT32 len; } FX_FontStyle; const FX_FontStyle g_FontStyles[] = { - "Bold", 4, - "Italic", 6, - "BoldItalic", 10, - "Reg", 3, - "Regular", 7, + { "Bold", 4 }, + { "Italic", 6 }, + { "BoldItalic", 10 }, + { "Reg", 3 }, + { "Regular", 7 }, }; CFX_ByteString ParseStyle(FX_LPCSTR pStyle, int iLen, int iIndex) {
diff --git a/fpdfsdk/include/fsdk_annothandler.h b/fpdfsdk/include/fsdk_annothandler.h index fec3d92..9f97c52 100644 --- a/fpdfsdk/include/fsdk_annothandler.h +++ b/fpdfsdk/include/fsdk_annothandler.h
@@ -85,7 +85,7 @@ class CPDFSDK_BFAnnotHandler:public IPDFSDK_AnnotHandler { public: - CPDFSDK_BFAnnotHandler(CPDFDoc_Environment* pApp):m_pFormFiller(NULL),m_pApp(pApp) {} + CPDFSDK_BFAnnotHandler(CPDFDoc_Environment* pApp) : m_pApp(pApp), m_pFormFiller(NULL) {} virtual ~CPDFSDK_BFAnnotHandler() {} public:
diff --git a/fpdfsdk/include/javascript/JS_GlobalData.h b/fpdfsdk/include/javascript/JS_GlobalData.h index 1001ff6..8eee158 100644 --- a/fpdfsdk/include/javascript/JS_GlobalData.h +++ b/fpdfsdk/include/javascript/JS_GlobalData.h
@@ -91,7 +91,6 @@ private: CFX_ArrayTemplate<CJS_GlobalData_Element*> m_arrayGlobalData; CFX_WideString m_sFilePath; - CPDFDoc_Environment* m_pApp; }; #endif //_JS_GLOBALDATA_H_
diff --git a/fpdfsdk/src/javascript/JS_GlobalData.cpp b/fpdfsdk/src/javascript/JS_GlobalData.cpp index 2207726..83771df 100644 --- a/fpdfsdk/src/javascript/JS_GlobalData.cpp +++ b/fpdfsdk/src/javascript/JS_GlobalData.cpp
@@ -117,7 +117,7 @@ 0x55,0x8b,0x6e,0x6b,0x19,0xa0,0xf8,0x77,0xd5,0xa3 }; -CJS_GlobalData::CJS_GlobalData(CPDFDoc_Environment* pApp) : m_pApp(pApp) +CJS_GlobalData::CJS_GlobalData(CPDFDoc_Environment* pApp) { // IBaseAnnot* pBaseAnnot = IBaseAnnot::GetBaseAnnot(m_pApp); // ASSERT(pBaseAnnot != NULL);
diff --git a/fpdfsdk/src/javascript/PublicMethods.cpp b/fpdfsdk/src/javascript/PublicMethods.cpp index c030d6c..e307f43 100644 --- a/fpdfsdk/src/javascript/PublicMethods.cpp +++ b/fpdfsdk/src/javascript/PublicMethods.cpp
@@ -68,25 +68,26 @@ FX_LPCSTR lpszCppMark; }; -static const stru_TbConvert fcTable[] = {"mmmm","%B", - "mmm", "%b", - "mm", "%m", +static const stru_TbConvert fcTable[] = { + { "mmmm","%B" }, + { "mmm", "%b" }, + { "mm", "%m" }, //"m" - "dddd","%A", - "ddd", "%a", - "dd", "%d", + { "dddd","%A" }, + { "ddd", "%a" }, + { "dd", "%d" }, //"d", "%w", - "yyyy","%Y", - "yy", "%y", - "HH", "%H", + { "yyyy","%Y" }, + { "yy", "%y" }, + { "HH", "%H" }, //"H" - "hh", "%I", + { "hh", "%I" }, //"h" - "MM", "%M", + { "MM", "%M" }, //"M" - "ss", "%S", + { "ss", "%S" }, //"s - "tt", "%p" + { "tt", "%p" }, //"t" };
diff --git a/fpdfsdk/src/javascript/util.cpp b/fpdfsdk/src/javascript/util.cpp index bafdb22..6563a10 100644 --- a/fpdfsdk/src/javascript/util.cpp +++ b/fpdfsdk/src/javascript/util.cpp
@@ -63,32 +63,32 @@ }; const stru_TbConvert fcTable[] = { - (FX_LPCWSTR)L"mmmm", (FX_LPCWSTR)L"%B", - (FX_LPCWSTR)L"mmm", (FX_LPCWSTR)L"%b", - (FX_LPCWSTR)L"mm", (FX_LPCWSTR)L"%m", + { (FX_LPCWSTR)L"mmmm", (FX_LPCWSTR)L"%B" }, + { (FX_LPCWSTR)L"mmm", (FX_LPCWSTR)L"%b" }, + { (FX_LPCWSTR)L"mm", (FX_LPCWSTR)L"%m" }, //"m" - (FX_LPCWSTR)L"dddd", (FX_LPCWSTR)L"%A", - (FX_LPCWSTR)L"ddd", (FX_LPCWSTR)L"%a", - (FX_LPCWSTR)L"dd", (FX_LPCWSTR)L"%d", + { (FX_LPCWSTR)L"dddd", (FX_LPCWSTR)L"%A" }, + { (FX_LPCWSTR)L"ddd", (FX_LPCWSTR)L"%a" }, + { (FX_LPCWSTR)L"dd", (FX_LPCWSTR)L"%d" }, //"d", "%w", - (FX_LPCWSTR)L"yyyy", (FX_LPCWSTR)L"%Y", - (FX_LPCWSTR)L"yy", (FX_LPCWSTR)L"%y", - (FX_LPCWSTR)L"HH", (FX_LPCWSTR)L"%H", + { (FX_LPCWSTR)L"yyyy", (FX_LPCWSTR)L"%Y" }, + { (FX_LPCWSTR)L"yy", (FX_LPCWSTR)L"%y" }, + { (FX_LPCWSTR)L"HH", (FX_LPCWSTR)L"%H" }, //"H" - (FX_LPCWSTR)L"hh", (FX_LPCWSTR)L"%I", + { (FX_LPCWSTR)L"hh", (FX_LPCWSTR)L"%I" }, //"h" - (FX_LPCWSTR)L"MM", (FX_LPCWSTR)L"%M", + { (FX_LPCWSTR)L"MM", (FX_LPCWSTR)L"%M" }, //"M" - (FX_LPCWSTR)L"ss", (FX_LPCWSTR)L"%S", + { (FX_LPCWSTR)L"ss", (FX_LPCWSTR)L"%S" }, //"s - (FX_LPCWSTR)L"TT", (FX_LPCWSTR)L"%p", + { (FX_LPCWSTR)L"TT", (FX_LPCWSTR)L"%p" }, //"t" #if defined(_WIN32) - (FX_LPCWSTR)L"tt", (FX_LPCWSTR)L"%p", - (FX_LPCWSTR)L"h", (FX_LPCWSTR)L"%#I", + { (FX_LPCWSTR)L"tt", (FX_LPCWSTR)L"%p" }, + { (FX_LPCWSTR)L"h", (FX_LPCWSTR)L"%#I" }, #else - (FX_LPCWSTR)L"tt", (FX_LPCWSTR)L"%P", - (FX_LPCWSTR)L"h", (FX_LPCWSTR)L"%l", + { (FX_LPCWSTR)L"tt", (FX_LPCWSTR)L"%P" }, + { (FX_LPCWSTR)L"h", (FX_LPCWSTR)L"%l" }, #endif };
diff --git a/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp b/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp index 9bb784c..bc33487 100644 --- a/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp +++ b/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
@@ -14,8 +14,8 @@ static CFX_MapPtrTemplate<FX_INT32, CPWL_Timer*> g_TimeMap; CPWL_Timer::CPWL_Timer(CPWL_TimerHandler* pAttached, IFX_SystemHandler* pSystemHandler) : - m_pAttached(pAttached), m_nTimerID(0), + m_pAttached(pAttached), m_pSystemHandler(pSystemHandler) { ASSERT(m_pAttached != NULL);