diff options
author | Nico Weber <thakis@chromium.org> | 2014-07-29 10:13:17 -0700 |
---|---|---|
committer | Nico Weber <thakis@chromium.org> | 2014-07-29 10:13:17 -0700 |
commit | 6c55495fcaf634e7f788f4dfe77fa1a106c9cd55 (patch) | |
tree | 3fe8612d47f51ff551e480a2088a48349cd9bdf7 /fpdfsdk/src/javascript | |
parent | c77e8f73397613f278eaeef2cae44debc6a684c8 (diff) | |
download | pdfium-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 'fpdfsdk/src/javascript')
-rw-r--r-- | fpdfsdk/src/javascript/JS_GlobalData.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/src/javascript/PublicMethods.cpp | 27 | ||||
-rw-r--r-- | fpdfsdk/src/javascript/util.cpp | 34 |
3 files changed, 32 insertions, 31 deletions
diff --git a/fpdfsdk/src/javascript/JS_GlobalData.cpp b/fpdfsdk/src/javascript/JS_GlobalData.cpp index 2207726890..83771dfe57 100644 --- a/fpdfsdk/src/javascript/JS_GlobalData.cpp +++ b/fpdfsdk/src/javascript/JS_GlobalData.cpp @@ -117,7 +117,7 @@ static const FX_BYTE JS_RC4KEY[] = {0x19,0xa8,0xe8,0x01,0xf6,0xa8,0xb6,0x4d,0x82 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 c030d6cad2..e307f432d3 100644 --- a/fpdfsdk/src/javascript/PublicMethods.cpp +++ b/fpdfsdk/src/javascript/PublicMethods.cpp @@ -68,25 +68,26 @@ struct stru_TbConvert 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 bafdb22da9..6563a10f97 100644 --- a/fpdfsdk/src/javascript/util.cpp +++ b/fpdfsdk/src/javascript/util.cpp @@ -63,32 +63,32 @@ struct stru_TbConvert }; 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 }; |