Fixed some "unused xxx" warnings + include autoconfig

This commit is contained in:
Jean-Francois Dockes 2015-10-07 08:30:49 +02:00
parent d942242047
commit 3b18facc16
13 changed files with 8 additions and 30 deletions

View File

@ -38,13 +38,13 @@
static pthread_t mainthread_id; static pthread_t mainthread_id;
#ifndef _WIN32
static void siglogreopen(int) static void siglogreopen(int)
{ {
if (recoll_ismainthread()) if (recoll_ismainthread())
DebugLog::reopen(); DebugLog::reopen();
} }
#ifndef _WIN32
// We would like to block SIGCHLD globally, but we can't because // We would like to block SIGCHLD globally, but we can't because
// QT uses it. Have to block it inside execmd.cpp // QT uses it. Have to block it inside execmd.cpp
static const int catchedSigs[] = {SIGINT, SIGQUIT, SIGTERM, SIGUSR1, SIGUSR2}; static const int catchedSigs[] = {SIGINT, SIGQUIT, SIGTERM, SIGUSR1, SIGUSR2};

View File

@ -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 // We set the ipath for the first handler here, others are set
// when they're pushed on the stack // when they're pushed on the stack
vector<string> vipath; vector<string> vipath;
int vipathidx = 0;
if (!ipath.empty()) { if (!ipath.empty()) {
vector<string> lipath; vector<string> lipath;
stringToTokens(ipath, lipath, cstr_isep, true); stringToTokens(ipath, lipath, cstr_isep, true);

View File

@ -126,7 +126,6 @@ void returnMimeHandler(RecollFilter *handler)
void clearMimeHandlerCache() void clearMimeHandlerCache()
{ {
LOGDEB(("clearMimeHandlerCache()\n")); LOGDEB(("clearMimeHandlerCache()\n"));
typedef multimap<string, RecollFilter*>::value_type value_type;
multimap<string, RecollFilter *>::iterator it; multimap<string, RecollFilter *>::iterator it;
PTMutexLocker locker(o_handlers_mutex); PTMutexLocker locker(o_handlers_mutex);
for (it = o_handlers.begin(); it != o_handlers.end(); it++) { for (it = o_handlers.begin(); it != o_handlers.end(); it++) {

View File

@ -14,6 +14,8 @@
* Free Software Foundation, Inc., * Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include "autoconfig.h"
#include "advsearch_w.h" #include "advsearch_w.h"
#include <qvariant.h> #include <qvariant.h>

View File

@ -14,6 +14,7 @@
* Free Software Foundation, Inc., * Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include "autoconfig.h"
#include <algorithm> #include <algorithm>
#include <cstdio> #include <cstdio>

View File

@ -14,6 +14,7 @@
* Free Software Foundation, Inc., * Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include "autoconfig.h"
#include <stdio.h> #include <stdio.h>

View File

@ -16,6 +16,8 @@
*/ */
#ifdef USE_ZEITGEIST #ifdef USE_ZEITGEIST
#include "autoconfig.h"
#include "rclzg.h" #include "rclzg.h"
#include "debuglog.h" #include "debuglog.h"

View File

@ -14,6 +14,7 @@
* Free Software Foundation, Inc., * Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include "autoconfig.h"
#include <stdio.h> #include <stdio.h>

View File

@ -106,7 +106,6 @@ bool DocSeqFiltered::getDoc(int idx, Rcl::Doc &doc, string *)
// Loop until we get enough docs // Loop until we get enough docs
Rcl::Doc tdoc; Rcl::Doc tdoc;
int i = 0;
while (idx >= (int)m_dbindices.size()) { while (idx >= (int)m_dbindices.size()) {
if (!m_seq->getDoc(backend_idx, tdoc)) if (!m_seq->getDoc(backend_idx, tdoc))
return false; return false;

View File

@ -39,16 +39,6 @@ using std::set;
#include "cancelcheck.h" #include "cancelcheck.h"
#include "unacpp.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 { struct MatchEntry {
// Start/End byte offsets in the document text // Start/End byte offsets in the document text
pair<int, int> offs; pair<int, int> offs;

View File

@ -173,7 +173,6 @@ double Query::Native::qualityTerms(Xapian::docid docid,
map<string, vector<string> > byRoot; map<string, vector<string> > byRoot;
for (vector<string>::const_iterator qit = terms.begin(); for (vector<string>::const_iterator qit = terms.begin();
qit != terms.end(); qit++) { qit != terms.end(); qit++) {
bool found = false;
map<string, string>::const_iterator eit = hld.terms.find(*qit); map<string, string>::const_iterator eit = hld.terms.find(*qit);
if (eit != hld.terms.end()) { if (eit != hld.terms.end()) {
byRoot[eit->second].push_back(*qit); 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 // We try to use a page which matches the "best" term. Get a sorted list
multimap<double, vector<string> > byQ; multimap<double, vector<string> > byQ;
double totalweight = qualityTerms(docid, terms, byQ);
for (multimap<double, vector<string> >::reverse_iterator mit = byQ.rbegin(); for (multimap<double, vector<string> >::reverse_iterator mit = byQ.rbegin();
mit != byQ.rend(); mit++) { mit != byQ.rend(); mit++) {

View File

@ -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 // 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 // that we can return it to a query without having to decode the
// original file. // original file.
bool syntabs = false;
// Note that the map accesses by operator[] create empty entries if they // Note that the map accesses by operator[] create empty entries if they
// don't exist yet. // don't exist yet.
string& absref = doc.meta[Doc::keyabs]; string& absref = doc.meta[Doc::keyabs];
trimstring(absref, " \t\r\n"); trimstring(absref, " \t\r\n");
if (absref.empty()) { if (absref.empty()) {
syntabs = true;
if (!doc.text.empty()) if (!doc.text.empty())
absref = cstr_syntAbs + absref = cstr_syntAbs +
neutchars(truncate_to_word(doc.text, m_idxAbsTruncLen), neutchars(truncate_to_word(doc.text, m_idxAbsTruncLen),

View File

@ -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) static const char *tmtptostr(int typ)
{ {
switch (typ) { switch (typ) {