mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-23 05:05:30 -04:00
Fix Some gcc warnings 383 to 208 lines
Left explicit #warning and deprecated. Some lines are wrong indented and produce mal formed code.
This commit is contained in:
parent
74aa55e347
commit
674b6de381
63 changed files with 379 additions and 346 deletions
|
@ -554,10 +554,10 @@ bool GxsSecurity::encrypt(uint8_t *& out, uint32_t &outlen, const uint8_t *in, u
|
|||
if(!EVP_SealInit(&ctx, EVP_aes_128_cbc(), &ek, &eklen, iv, &public_key, 1)) return false;
|
||||
|
||||
// now assign memory to out accounting for data, and cipher block size, key length, and key length val
|
||||
out = (uint8_t*)rs_malloc(inlen + cipher_block_size + size_net_ekl + eklen + EVP_MAX_IV_LENGTH);
|
||||
out = (uint8_t*)rs_malloc(inlen + cipher_block_size + size_net_ekl + eklen + EVP_MAX_IV_LENGTH) ;
|
||||
|
||||
if(out == NULL)
|
||||
return false ;
|
||||
if (out == NULL)
|
||||
return false;
|
||||
|
||||
net_ekl = htonl(eklen);
|
||||
memcpy((unsigned char*)out + out_offset, &net_ekl, size_net_ekl);
|
||||
|
|
|
@ -2226,7 +2226,7 @@ void RsGenExchange::processMessageDelete()
|
|||
}
|
||||
|
||||
|
||||
#warning TODO: notify for deleted messages
|
||||
#warning csoler: TODO: notify for deleted messages
|
||||
#ifdef SUSPENDED
|
||||
std::list<RsGxsGroupId> grpDeleted;
|
||||
std::map<uint32_t, GrpNote>::iterator mit = toNotify.begin();
|
||||
|
@ -2402,7 +2402,7 @@ void RsGenExchange::publishGrps()
|
|||
{
|
||||
RsTemporaryMemory metaData(mdSize);
|
||||
serialOk = grp->metaData->serialise(metaData, mdSize,RS_GXS_GRP_META_DATA_CURRENT_API_VERSION);
|
||||
#warning TODO: grp->meta should be renamed grp->public_meta !
|
||||
#warning csoler: TODO: grp->meta should be renamed grp->public_meta !
|
||||
grp->meta.setBinData(metaData, mdSize);
|
||||
}
|
||||
|
||||
|
@ -2419,7 +2419,7 @@ void RsGenExchange::publishGrps()
|
|||
mDataAccess->updateGroupData(grp);
|
||||
else
|
||||
mDataAccess->addGroupData(grp);
|
||||
#warning this is bad: addGroupData/updateGroupData actially deletes grp. But it may be used below? grp should be a class object and not deleted manually!
|
||||
#warning csoler: this is bad: addGroupData/updateGroupData actially deletes grp. But it may be used below? grp should be a class object and not deleted manually!
|
||||
|
||||
groups_to_subscribe.push_back(grpId) ;
|
||||
}
|
||||
|
|
|
@ -361,8 +361,9 @@ uint32_t RsGxsDataAccess::requestStatus(uint32_t token)
|
|||
if(mPublicToken.find(token) != mPublicToken.end())
|
||||
return mPublicToken[token];
|
||||
}
|
||||
if(!checkRequestStatus(token, status, reqtype, anstype, ts))
|
||||
return RsTokenService::GXS_REQUEST_V2_STATUS_FAILED ;
|
||||
|
||||
if (!checkRequestStatus(token, status, reqtype, anstype, ts))
|
||||
return RsTokenService::GXS_REQUEST_V2_STATUS_FAILED;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
|
|
@ -1641,7 +1641,9 @@ void RsGxsNetService::recvNxsItemQueue()
|
|||
|
||||
default:
|
||||
if(ni->PacketSubType() != RS_PKT_SUBTYPE_NXS_ENCRYPTED_DATA_ITEM)
|
||||
std::cerr << "Unhandled item subtype " << (uint32_t) ni->PacketSubType() << " in RsGxsNetService: " << std::endl; break;
|
||||
{
|
||||
std::cerr << "Unhandled item subtype " << (uint32_t) ni->PacketSubType() << " in RsGxsNetService: " << std::endl ; break ;
|
||||
}
|
||||
}
|
||||
delete item ;
|
||||
}
|
||||
|
@ -3291,8 +3293,8 @@ void RsGxsNetService::locked_genSendGrpsTransaction(NxsTransaction* tr)
|
|||
|
||||
if(!grps.empty())
|
||||
mDataStore->retrieveNxsGrps(grps, false, false);
|
||||
else
|
||||
return;
|
||||
else
|
||||
return;
|
||||
|
||||
NxsTransaction* newTr = new NxsTransaction();
|
||||
newTr->mFlag = NxsTransaction::FLAG_STATE_WAITING_CONFIRM;
|
||||
|
@ -3304,7 +3306,7 @@ void RsGxsNetService::locked_genSendGrpsTransaction(NxsTransaction* tr)
|
|||
RsPeerId peerId = tr->mTransaction->PeerId();
|
||||
for(;mit != grps.end(); ++mit)
|
||||
{
|
||||
#warning Should make sure that no private key information is sneaked in here for the grp
|
||||
#warning csoler: Should make sure that no private key information is sneaked in here for the grp
|
||||
mit->second->PeerId(peerId); // set so it gets sent to right peer
|
||||
mit->second->transactionNumber = transN;
|
||||
newTr->mItems.push_back(mit->second);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue