mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-26 15:28:28 -05:00
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:
parent
d0eb40b08c
commit
2728880621
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user