From 12367cb5e83e771cd67948c810fdd5f63d61af87 Mon Sep 17 00:00:00 2001 From: weili Date: Fri, 3 Jun 2016 11:22:16 -0700 Subject: 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 --- core/fxcodec/codec/fx_codec_png.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '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 61d4cebdbb..f7b922973e 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; -- cgit v1.2.3