Fix CppCheck in p3postbase.cc

/libretroshare/src/services/p3postbase.cc:628: warning:
Cppcheck(invalidScanfArgType_int): %d in format string (no. 1) requires
'int *' but the argument type is 'unsigned int *'.
/libretroshare/src/services/p3postbase.cc:628: warning:
Cppcheck(invalidScanfArgType_int): %d in format string (no. 2) requires
'int *' but the argument type is 'unsigned int *'.
/libretroshare/src/services/p3postbase.cc:628: warning:
Cppcheck(invalidScanfArgType_int): %d in format string (no. 3) requires
'int *' but the argument type is 'unsigned int *'.
This commit is contained in:
Phenom 2017-07-28 23:59:51 +02:00 committed by csoler
parent d0eb40b08c
commit 2728880621

View File

@ -625,7 +625,7 @@ bool extractPostCache(const std::string &str, PostStats &s)
{
uint32_t iupvotes, idownvotes, icomments;
if (3 == sscanf(str.c_str(), "%d %d %d", &icomments, &iupvotes, &idownvotes))
if (3 == sscanf(str.c_str(), "%u %u %u", &icomments, &iupvotes, &idownvotes))
{
s.comments = icomments;
s.up_votes = iupvotes;