Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2861)

Unified Diff: core/fxcodec/codec/fx_codec_png.cpp

Issue 2036203004: Fix some code which causes warnings when compiled by /analyze tool (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/fxcodec/codec/fx_codec_png.cpp
diff --git a/core/fxcodec/codec/fx_codec_png.cpp b/core/fxcodec/codec/fx_codec_png.cpp
index 61d4cebdbba28aa3ab2fc363232b848e75c51fc0..f7b922973eb590c72ef039edfcae88a1f43fe720 100644
--- a/core/fxcodec/codec/fx_codec_png.cpp
+++ b/core/fxcodec/codec/fx_codec_png.cpp
@@ -56,7 +56,7 @@ static void _png_load_bmp_attribute(png_structp png_ptr,
if (t) {
FXSYS_memset(pAttribute->m_strTime, 0, sizeof(pAttribute->m_strTime));
FXSYS_snprintf((FX_CHAR*)pAttribute->m_strTime,
- sizeof(pAttribute->m_strTime), "%4d:%2d:%2d %2d:%2d:%2d",
+ sizeof(pAttribute->m_strTime), "%4u:%2u:%2u %2u:%2u:%2u",
t->year, t->month, t->day, t->hour, t->minute, t->second);
pAttribute->m_strTime[sizeof(pAttribute->m_strTime) - 1] = 0;
bTime = 1;

Powered by Google App Engine
This is Rietveld 408576698