summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/JS_Value.cpp
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-06-03 11:22:16 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-03 11:22:16 -0700
commit12367cb5e83e771cd67948c810fdd5f63d61af87 (patch)
tree47daac780e5c028ba531830b514c0c60102f1368 /fpdfsdk/javascript/JS_Value.cpp
parent79d798da0d4b5f9f1fc27917102bdd7bcfbe863e (diff)
downloadpdfium-12367cb5e83e771cd67948c810fdd5f63d61af87.tar.xz
Fix some code which causes warnings when compiled by /analyze tool
The code may not cause error conditions, but can be improved. These warnings include uninitialized variables, signed/unsigned mismatch, redundant condition, and using bool in arithmetic operations. Also remove a chunk of unused code. BUG=chromium:613623, chromium:427616 Review-Url: https://codereview.chromium.org/2036203004
Diffstat (limited to 'fpdfsdk/javascript/JS_Value.cpp')
-rw-r--r--fpdfsdk/javascript/JS_Value.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/fpdfsdk/javascript/JS_Value.cpp b/fpdfsdk/javascript/JS_Value.cpp
index ab02f02cfb..b01ee586e1 100644
--- a/fpdfsdk/javascript/JS_Value.cpp
+++ b/fpdfsdk/javascript/JS_Value.cpp
@@ -718,7 +718,7 @@ int _MonthFromTime(double t) {
int _DateFromTime(double t) {
int day = _DayWithinYear(t);
int year = _YearFromTime(t);
- bool leap = _isLeapYear(year);
+ int leap = _isLeapYear(year);
int month = _MonthFromTime(t);
switch (month) {
case 0: