mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-28 16:17:28 -04:00
libretroshare: fix comparison between signed and unsigned integer
This commit is contained in:
parent
8b788b2aa8
commit
4f60c8cc9b
6 changed files with 15 additions and 16 deletions
|
@ -110,7 +110,6 @@ uint32_t RsGxsIdLocalInfoItem::serial_size()
|
|||
std::ostream& RsGxsIdLocalInfoItem::print(std::ostream& out, uint16_t indent)
|
||||
{
|
||||
printRsItemBase(out, "RsGxsIdLocalInfoItem", indent);
|
||||
uint16_t int_Indent = indent + 2;
|
||||
|
||||
// convert from binary to hex.
|
||||
for(std::map<RsGxsId,time_t>::const_iterator it(mTimeStamps.begin());it!=mTimeStamps.end();++it)
|
||||
|
@ -382,7 +381,7 @@ RsGxsIdLocalInfoItem *RsGxsIdSerialiser::deserialise_GxsIdLocalInfoItem(void *da
|
|||
uint32_t n=0 ;
|
||||
ok &= getRawUInt32(data, rssize, &offset, &n) ;
|
||||
|
||||
for(int i=0;ok && i<n;++i)
|
||||
for(uint32_t i=0;ok && i<n;++i)
|
||||
{
|
||||
RsGxsId gxsid ;
|
||||
time_t TS ;
|
||||
|
@ -397,8 +396,8 @@ RsGxsIdLocalInfoItem *RsGxsIdSerialiser::deserialise_GxsIdLocalInfoItem(void *da
|
|||
{
|
||||
ok &= getRawUInt32(data, rssize, &offset, &n) ;
|
||||
RsGxsId gxsid ;
|
||||
|
||||
for(int i=0;ok && i<n;++i)
|
||||
|
||||
for(uint32_t i=0;ok && i<n;++i)
|
||||
{
|
||||
ok &= gxsid.deserialise(data,rssize,offset) ;
|
||||
|
||||
|
|
|
@ -323,7 +323,7 @@ RsGxsReputationSetItem *RsGxsReputationSerialiser::deserialiseReputationSetItem_
|
|||
uint32_t S ;
|
||||
ok &= getRawUInt32(data, tlvsize, &offset, &S);
|
||||
|
||||
for(int i=0;ok && i<S;++i)
|
||||
for(uint32_t i = 0; ok && (i < S); ++i)
|
||||
{
|
||||
RsPeerId pid ;
|
||||
uint32_t op ;
|
||||
|
@ -361,7 +361,7 @@ RsGxsReputationSetItem *RsGxsReputationSerialiser::deserialiseReputationSetItem(
|
|||
uint32_t S ;
|
||||
ok &= getRawUInt32(data, tlvsize, &offset, &S);
|
||||
|
||||
for(int i=0;ok && i<S;++i)
|
||||
for(uint32_t i = 0; ok && (i < S); ++i)
|
||||
{
|
||||
RsPeerId pid ;
|
||||
uint32_t op ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue