mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-24 22:30:42 -04:00
Fix warning: ‘n’ may be used uninitialized in this function
../../../trunk/libretroshare/src/rsitems/rsmsgitems.cc: In member function ‘virtual void RsMsgTags::serial_process(RsGenericSerializer::SerializeJob, RsGenericSerializer::SerializeContext&)’: ../../../trunk/libretroshare/src/rsitems/rsmsgitems.cc:93:22: warning: ‘n’ may be used uninitialized in this function [-Wmaybe-uninitialized] 93 | uint32_t n ; | ^
This commit is contained in:
parent
477f0a8a76
commit
b40ca53f13
1 changed files with 8 additions and 8 deletions
|
@ -90,7 +90,7 @@ void RsMsgTags::serial_process(RsGenericSerializer::SerializeJob j,RsGenericSeri
|
|||
if(j == RsGenericSerializer::DESERIALIZE)
|
||||
while(ctx.mOffset < ctx.mSize)
|
||||
{
|
||||
uint32_t n ;
|
||||
uint32_t n = 0;// No real need to initialize but otherwise the compiler complains.
|
||||
RsTypeSerializer::serial_process<uint32_t>(j,ctx,n,"tagIds element") ;
|
||||
tagIds.push_back(n) ;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue