mirror of
https://github.com/privacore/open-source-search-engine.git
synced 2025-07-14 02:36:06 -04:00
Fix clang unreachable code warnings
This commit is contained in:
1
Mem.cpp
1
Mem.cpp
@ -834,7 +834,6 @@ int Mem::printBreech ( int32_t i) {
|
||||
if ( flag == 0 ) return 1;
|
||||
|
||||
gbshutdownCorrupted();
|
||||
return 1; //shut up PVS-studio
|
||||
}
|
||||
|
||||
// check all allocated memory for buffer under/overruns
|
||||
|
@ -193,7 +193,6 @@ bool Parm::printVal(SafeBuf *sb, collnum_t collnum, int32_t occNum) const {
|
||||
log("parms: missing parm type!!");
|
||||
|
||||
g_process.shutdownAbort(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
@ -438,7 +438,6 @@ int64_t Posdb::getTermFreq ( collnum_t collnum, int64_t termId ) {
|
||||
if( !buckets ) {
|
||||
log(LOG_LOGIC, "%s:%s:%d: No buckets!", __FILE__, __func__, __LINE__);
|
||||
gbshutdownLogicError();
|
||||
return -1; // for code analyzers not catching the abort above
|
||||
}
|
||||
|
||||
int64_t numBytes = buckets->getListSize(collnum, (char *)&startKey, (char *)&endKey, NULL, NULL);
|
||||
|
@ -5771,7 +5771,6 @@ static inline bool isTermValueInRange( const char *p, const QueryTerm *qt ) {
|
||||
|
||||
// how did this happen?
|
||||
gbshutdownAbort(true);
|
||||
return false; // shut up PVS-Studio
|
||||
}
|
||||
|
||||
|
||||
|
@ -683,12 +683,12 @@ bool RdbMap::addRecord ( char *key, char *rec , int32_t recSize ) {
|
||||
m_badKeys, m_file.getDir(), m_file.getFilename());
|
||||
log(LOG_LOGIC,"build: offset=%" PRId64" k1=%s k2=%s", m_offset, KEYSTR(m_lastKey,m_ks), KEYSTR(key,m_ks));
|
||||
|
||||
// @todo: Temporarily added for tracking down bug. We want the core. Keep permanently?
|
||||
|
||||
/// @todo Temporarily added for tracking down bug. We want the core. Keep permanently?
|
||||
gbshutdownCorrupted();
|
||||
|
||||
// if being called from RdbDump.cpp...
|
||||
g_errno = ECORRUPTDATA;
|
||||
return false;
|
||||
// g_errno = ECORRUPTDATA;
|
||||
// return false;
|
||||
}
|
||||
|
||||
// remember the lastKey in the whole file
|
||||
|
@ -1395,7 +1395,6 @@ bool SpiderLoop::spiderUrl9 ( SpiderRequest *sreq ,
|
||||
if( !tree ) {
|
||||
// Sanity
|
||||
gbshutdownLogicError();
|
||||
return false; // shut up, pvs..
|
||||
}
|
||||
|
||||
// now we just take it out of doledb instantly
|
||||
|
@ -324,7 +324,6 @@ bool Statsdb::addStat ( int32_t niceness ,
|
||||
if( !tree ) {
|
||||
log(LOG_LOGIC,"%s:%s:%d: Rdb has no tree!", __FILE__, __func__, __LINE__);
|
||||
gbshutdownLogicError();
|
||||
return true;
|
||||
}
|
||||
// do not add stats to our tree if it is loading
|
||||
if(tree->isLoading()) return true;
|
||||
|
@ -2785,7 +2785,6 @@ int TcpServer::sslHandshake ( TcpSocket *s ) {
|
||||
if ( !s->m_ssl ) {
|
||||
log("ssl: SSL is NULL after SSL_new");
|
||||
g_process.shutdownAbort(true);
|
||||
return -1; // for code analyzers..
|
||||
}
|
||||
|
||||
SSL_set_fd(s->m_ssl, s->m_sd);
|
||||
|
Reference in New Issue
Block a user