mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Suppress some warnings.
This commit is contained in:
@@ -419,12 +419,12 @@ void Application::loadOldLedger(const std::string& l)
|
|||||||
mLedgerMaster.switchLedgers(loadLedger, openLedger);
|
mLedgerMaster.switchLedgers(loadLedger, openLedger);
|
||||||
mNetOps.setLastCloseTime(loadLedger->getCloseTimeNC());
|
mNetOps.setLastCloseTime(loadLedger->getCloseTimeNC());
|
||||||
}
|
}
|
||||||
catch (SHAMapMissingNode& mn)
|
catch (SHAMapMissingNode&)
|
||||||
{
|
{
|
||||||
cLog(lsFATAL) << "Data is missing for selected ledger";
|
cLog(lsFATAL) << "Data is missing for selected ledger";
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
catch (boost::bad_lexical_cast& blc)
|
catch (boost::bad_lexical_cast&)
|
||||||
{
|
{
|
||||||
cLog(lsFATAL) << "Ledger specified '" << l << "' is not valid";
|
cLog(lsFATAL) << "Ledger specified '" << l << "' is not valid";
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ void SNTPClient::resolveComplete(const boost::system::error_code& error, boost::
|
|||||||
query.mReceivedReply = false;
|
query.mReceivedReply = false;
|
||||||
query.mLocalTimeSent = now;
|
query.mLocalTimeSent = now;
|
||||||
getRand(reinterpret_cast<unsigned char *>(&query.mQueryNonce), sizeof(query.mQueryNonce));
|
getRand(reinterpret_cast<unsigned char *>(&query.mQueryNonce), sizeof(query.mQueryNonce));
|
||||||
reinterpret_cast<uint32*>(SNTPQueryData)[NTP_OFF_XMITTS_INT] = time(NULL) + NTP_UNIX_OFFSET;
|
reinterpret_cast<uint32*>(SNTPQueryData)[NTP_OFF_XMITTS_INT] = static_cast<uint32>(time(NULL)) + NTP_UNIX_OFFSET;
|
||||||
reinterpret_cast<uint32*>(SNTPQueryData)[NTP_OFF_XMITTS_FRAC] = query.mQueryNonce;
|
reinterpret_cast<uint32*>(SNTPQueryData)[NTP_OFF_XMITTS_FRAC] = query.mQueryNonce;
|
||||||
mSocket.async_send_to(boost::asio::buffer(SNTPQueryData, 48), *sel,
|
mSocket.async_send_to(boost::asio::buffer(SNTPQueryData, 48), *sel,
|
||||||
boost::bind(&SNTPClient::sendComplete, this,
|
boost::bind(&SNTPClient::sendComplete, this,
|
||||||
@@ -148,7 +148,7 @@ void SNTPClient::processReply()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t now = time(NULL);
|
int64 now = static_cast<int>(time(NULL));
|
||||||
timev -= now;
|
timev -= now;
|
||||||
timev -= NTP_UNIX_OFFSET;
|
timev -= NTP_UNIX_OFFSET;
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ template<typename c_Key, typename c_Data> void TaggedCache<c_Key, c_Data>::setTa
|
|||||||
boost::recursive_mutex::scoped_lock sl(mLock);
|
boost::recursive_mutex::scoped_lock sl(mLock);
|
||||||
mTargetSize = s;
|
mTargetSize = s;
|
||||||
if (s > 0)
|
if (s > 0)
|
||||||
mCache.rehash((s + (s >> 2)) / mCache.max_load_factor() + 1);
|
mCache.rehash(static_cast<std::size_t>((s + (s >> 2)) / mCache.max_load_factor() + 1));
|
||||||
Log(lsDEBUG, TaggedCachePartition) << mName << " target size set to " << s;
|
Log(lsDEBUG, TaggedCachePartition) << mName << " target size set to " << s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,7 +136,7 @@ template<typename c_Key, typename c_Data> void TaggedCache<c_Key, c_Data>::sweep
|
|||||||
int target = mLastSweep - mTargetAge;
|
int target = mLastSweep - mTargetAge;
|
||||||
int cacheRemovals = 0, mapRemovals = 0, cc = 0;
|
int cacheRemovals = 0, mapRemovals = 0, cc = 0;
|
||||||
|
|
||||||
if ((mTargetSize != 0) && (mCache.size() > mTargetSize))
|
if ((mTargetSize != 0) && (static_cast<int>(mCache.size()) > mTargetSize))
|
||||||
{
|
{
|
||||||
target = mLastSweep - (mTargetAge * mTargetSize / mCache.size());
|
target = mLastSweep - (mTargetAge * mTargetSize / mCache.size());
|
||||||
if (target > (mLastSweep - 2))
|
if (target > (mLastSweep - 2))
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ static std::vector<std::string> getSchema(DatabaseCon* dbc, const std::string& d
|
|||||||
static bool schemaHas(DatabaseCon* dbc, const std::string& dbName, int line, const std::string& content)
|
static bool schemaHas(DatabaseCon* dbc, const std::string& dbName, int line, const std::string& content)
|
||||||
{
|
{
|
||||||
std::vector<std::string> schema = getSchema(dbc, dbName);
|
std::vector<std::string> schema = getSchema(dbc, dbName);
|
||||||
if (schema.size() <= line)
|
if (static_cast<int>(schema.size()) <= line)
|
||||||
{
|
{
|
||||||
Log(lsFATAL) << "Schema for " << dbName << " has too few lines";
|
Log(lsFATAL) << "Schema for " << dbName << " has too few lines";
|
||||||
throw std::runtime_error("bad schema");
|
throw std::runtime_error("bad schema");
|
||||||
@@ -50,7 +50,7 @@ static void addTxnSeqField()
|
|||||||
int metaSize = 2048;
|
int metaSize = 2048;
|
||||||
rawMeta.resize(metaSize);
|
rawMeta.resize(metaSize);
|
||||||
metaSize = db->getBinary("TxnMeta", &*rawMeta.begin(), rawMeta.size());
|
metaSize = db->getBinary("TxnMeta", &*rawMeta.begin(), rawMeta.size());
|
||||||
if (metaSize > rawMeta.size())
|
if (metaSize > static_cast<int>(rawMeta.size()))
|
||||||
{
|
{
|
||||||
rawMeta.resize(metaSize);
|
rawMeta.resize(metaSize);
|
||||||
db->getBinary("TxnMeta", &*rawMeta.begin(), rawMeta.size());
|
db->getBinary("TxnMeta", &*rawMeta.begin(), rawMeta.size());
|
||||||
|
|||||||
Reference in New Issue
Block a user