OSDN Git Service

Cppcheck: %d in format string (no. 1) requires 'int' but the argument type is 'unsign...
authorsdottaka <sdottaka@sourceforge.net>
Mon, 5 May 2014 13:21:27 +0000 (22:21 +0900)
committersdottaka <sdottaka@sourceforge.net>
Mon, 5 May 2014 13:21:27 +0000 (22:21 +0900)
--HG--
branch : stable

Src/Common/SuperComboBox.cpp
Src/codepage_detect.cpp

index 4caf5ce..d2f8471 100644 (file)
@@ -180,7 +180,7 @@ void CSuperComboBox::LoadState(LPCTSTR szRegSubKey, UINT nMaxItems)
        UINT cnt = AfxGetApp()->GetProfileInt(szRegSubKey, _T("Count"), 0);
        for (UINT i=0; i < cnt && i < nMaxItems; i++)
        {
-               s2.Format(_T("Item_%d"), i);
+               s2.Format(_T("Item_%u"), i);
                s = AfxGetApp()->GetProfileString(szRegSubKey, s2);
                if (FindStringExact(-1, s) == -1
                        && !s.IsEmpty())
index 2beaf8d..f43c78f 100644 (file)
@@ -186,7 +186,7 @@ static unsigned demoGuessEncoding_rc(const char *src, size_t len, int defcodepag
                size_t n = len < sizeof line - 1 ? len : sizeof line - 1;
                memcpy(line, base, n);
                line[n] = 0;
-       } while (len && sscanf(line, "#pragma code_page(%d)", &cp) != 1);
+       } while (len && sscanf(line, "#pragma code_page(%u)", &cp) != 1);
        return cp;
 }