diff options
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/fpdf_flatten.cpp | 3 | ||||
-rw-r--r-- | fpdfsdk/fsdk_baseannot.cpp | 8 | ||||
-rw-r--r-- | fpdfsdk/javascript/JS_Value.cpp | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/fpdfsdk/fpdf_flatten.cpp b/fpdfsdk/fpdf_flatten.cpp index 2d11bfee7b..27646255c8 100644 --- a/fpdfsdk/fpdf_flatten.cpp +++ b/fpdfsdk/fpdf_flatten.cpp @@ -156,7 +156,8 @@ FX_FLOAT GetMinMaxValue(CPDF_RectArray& array, break; } default: - break; + // Not reachable. + return 0.0f; } fRet = pArray[0]; if (type == MAX) { diff --git a/fpdfsdk/fsdk_baseannot.cpp b/fpdfsdk/fsdk_baseannot.cpp index e2ee6f7c73..1345f234b6 100644 --- a/fpdfsdk/fsdk_baseannot.cpp +++ b/fpdfsdk/fsdk_baseannot.cpp @@ -346,14 +346,14 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString( CFX_ByteString CPDFSDK_DateTime::ToCommonDateTimeString() { CFX_ByteString str1; - str1.Format("%04d-%02d-%02d %02d:%02d:%02d ", dt.year, dt.month, dt.day, + str1.Format("%04d-%02u-%02u %02u:%02u:%02u ", dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second); if (dt.tzHour < 0) str1 += "-"; else str1 += "+"; CFX_ByteString str2; - str2.Format("%02d:%02d", abs(dt.tzHour), dt.tzMinute); + str2.Format("%02d:%02u", abs(dt.tzHour), dt.tzMinute); return str1 + str2; } @@ -361,7 +361,7 @@ CFX_ByteString CPDFSDK_DateTime::ToPDFDateTimeString() { CFX_ByteString dtStr; char tempStr[32]; memset(tempStr, 0, sizeof(tempStr)); - FXSYS_snprintf(tempStr, sizeof(tempStr) - 1, "D:%04d%02d%02d%02d%02d%02d", + FXSYS_snprintf(tempStr, sizeof(tempStr) - 1, "D:%04d%02u%02u%02u%02u%02u", dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second); dtStr = CFX_ByteString(tempStr); if (dt.tzHour < 0) @@ -369,7 +369,7 @@ CFX_ByteString CPDFSDK_DateTime::ToPDFDateTimeString() { else dtStr += CFX_ByteString("+"); memset(tempStr, 0, sizeof(tempStr)); - FXSYS_snprintf(tempStr, sizeof(tempStr) - 1, "%02d'%02d'", abs(dt.tzHour), + FXSYS_snprintf(tempStr, sizeof(tempStr) - 1, "%02d'%02u'", abs(dt.tzHour), dt.tzMinute); dtStr += CFX_ByteString(tempStr); return dtStr; 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: |