Fixed some "unused xxx" warnings + include autoconfig
This commit is contained in:
parent
d942242047
commit
3b18facc16
@ -38,13 +38,13 @@
|
||||
|
||||
static pthread_t mainthread_id;
|
||||
|
||||
#ifndef _WIN32
|
||||
static void siglogreopen(int)
|
||||
{
|
||||
if (recoll_ismainthread())
|
||||
DebugLog::reopen();
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
// We would like to block SIGCHLD globally, but we can't because
|
||||
// QT uses it. Have to block it inside execmd.cpp
|
||||
static const int catchedSigs[] = {SIGINT, SIGQUIT, SIGTERM, SIGUSR1, SIGUSR2};
|
||||
|
||||
@ -757,7 +757,6 @@ FileInterner::Status FileInterner::internfile(Rcl::Doc& doc, const string& ipath
|
||||
// We set the ipath for the first handler here, others are set
|
||||
// when they're pushed on the stack
|
||||
vector<string> vipath;
|
||||
int vipathidx = 0;
|
||||
if (!ipath.empty()) {
|
||||
vector<string> lipath;
|
||||
stringToTokens(ipath, lipath, cstr_isep, true);
|
||||
|
||||
@ -126,7 +126,6 @@ void returnMimeHandler(RecollFilter *handler)
|
||||
void clearMimeHandlerCache()
|
||||
{
|
||||
LOGDEB(("clearMimeHandlerCache()\n"));
|
||||
typedef multimap<string, RecollFilter*>::value_type value_type;
|
||||
multimap<string, RecollFilter *>::iterator it;
|
||||
PTMutexLocker locker(o_handlers_mutex);
|
||||
for (it = o_handlers.begin(); it != o_handlers.end(); it++) {
|
||||
|
||||
@ -14,6 +14,8 @@
|
||||
* Free Software Foundation, Inc.,
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#include "autoconfig.h"
|
||||
|
||||
#include "advsearch_w.h"
|
||||
|
||||
#include <qvariant.h>
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
* Free Software Foundation, Inc.,
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#include "autoconfig.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
* Free Software Foundation, Inc.,
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#include "autoconfig.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
@ -16,6 +16,8 @@
|
||||
*/
|
||||
|
||||
#ifdef USE_ZEITGEIST
|
||||
#include "autoconfig.h"
|
||||
|
||||
#include "rclzg.h"
|
||||
|
||||
#include "debuglog.h"
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
* Free Software Foundation, Inc.,
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#include "autoconfig.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
@ -106,7 +106,6 @@ bool DocSeqFiltered::getDoc(int idx, Rcl::Doc &doc, string *)
|
||||
|
||||
// Loop until we get enough docs
|
||||
Rcl::Doc tdoc;
|
||||
int i = 0;
|
||||
while (idx >= (int)m_dbindices.size()) {
|
||||
if (!m_seq->getDoc(backend_idx, tdoc))
|
||||
return false;
|
||||
|
||||
@ -39,16 +39,6 @@ using std::set;
|
||||
#include "cancelcheck.h"
|
||||
#include "unacpp.h"
|
||||
|
||||
// For debug printing
|
||||
static string vecStringToString(const vector<string>& t)
|
||||
{
|
||||
string sterms;
|
||||
for (vector<string>::const_iterator it = t.begin(); it != t.end(); it++) {
|
||||
sterms += "[" + *it + "] ";
|
||||
}
|
||||
return sterms;
|
||||
}
|
||||
|
||||
struct MatchEntry {
|
||||
// Start/End byte offsets in the document text
|
||||
pair<int, int> offs;
|
||||
|
||||
@ -173,7 +173,6 @@ double Query::Native::qualityTerms(Xapian::docid docid,
|
||||
map<string, vector<string> > byRoot;
|
||||
for (vector<string>::const_iterator qit = terms.begin();
|
||||
qit != terms.end(); qit++) {
|
||||
bool found = false;
|
||||
map<string, string>::const_iterator eit = hld.terms.find(*qit);
|
||||
if (eit != hld.terms.end()) {
|
||||
byRoot[eit->second].push_back(*qit);
|
||||
@ -280,7 +279,6 @@ int Query::Native::getFirstMatchPage(Xapian::docid docid, string& term)
|
||||
|
||||
// We try to use a page which matches the "best" term. Get a sorted list
|
||||
multimap<double, vector<string> > byQ;
|
||||
double totalweight = qualityTerms(docid, terms, byQ);
|
||||
|
||||
for (multimap<double, vector<string> >::reverse_iterator mit = byQ.rbegin();
|
||||
mit != byQ.rend(); mit++) {
|
||||
|
||||
@ -1501,13 +1501,11 @@ bool Db::addOrUpdate(const string &udi, const string &parent_udi, Doc &doc)
|
||||
// document. This is then not indexed, but part of the doc data so
|
||||
// that we can return it to a query without having to decode the
|
||||
// original file.
|
||||
bool syntabs = false;
|
||||
// Note that the map accesses by operator[] create empty entries if they
|
||||
// don't exist yet.
|
||||
string& absref = doc.meta[Doc::keyabs];
|
||||
trimstring(absref, " \t\r\n");
|
||||
if (absref.empty()) {
|
||||
syntabs = true;
|
||||
if (!doc.text.empty())
|
||||
absref = cstr_syntAbs +
|
||||
neutchars(truncate_to_word(doc.text, m_idxAbsTruncLen),
|
||||
|
||||
@ -132,18 +132,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/** Add prefix to all strings in list.
|
||||
* @param prefix already wrapped prefix
|
||||
*/
|
||||
static void addPrefix(vector<TermMatchEntry>& terms, const string& prefix)
|
||||
{
|
||||
if (prefix.empty())
|
||||
return;
|
||||
for (vector<TermMatchEntry>::iterator it = terms.begin();
|
||||
it != terms.end(); it++)
|
||||
it->term.insert(0, prefix);
|
||||
}
|
||||
|
||||
static const char *tmtptostr(int typ)
|
||||
{
|
||||
switch (typ) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user