diff --git a/src/common/rclinit.cpp b/src/common/rclinit.cpp index f568cc9d..52bc6853 100644 --- a/src/common/rclinit.cpp +++ b/src/common/rclinit.cpp @@ -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}; diff --git a/src/internfile/internfile.cpp b/src/internfile/internfile.cpp index 6ce359ed..4d885a6f 100644 --- a/src/internfile/internfile.cpp +++ b/src/internfile/internfile.cpp @@ -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 vipath; - int vipathidx = 0; if (!ipath.empty()) { vector lipath; stringToTokens(ipath, lipath, cstr_isep, true); diff --git a/src/internfile/mimehandler.cpp b/src/internfile/mimehandler.cpp index d26ad8ca..5cd1bbf3 100644 --- a/src/internfile/mimehandler.cpp +++ b/src/internfile/mimehandler.cpp @@ -126,7 +126,6 @@ void returnMimeHandler(RecollFilter *handler) void clearMimeHandlerCache() { LOGDEB(("clearMimeHandlerCache()\n")); - typedef multimap::value_type value_type; multimap::iterator it; PTMutexLocker locker(o_handlers_mutex); for (it = o_handlers.begin(); it != o_handlers.end(); it++) { diff --git a/src/qtgui/advsearch_w.cpp b/src/qtgui/advsearch_w.cpp index 0c4f9b0d..a082abed 100644 --- a/src/qtgui/advsearch_w.cpp +++ b/src/qtgui/advsearch_w.cpp @@ -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 diff --git a/src/qtgui/guiutils.cpp b/src/qtgui/guiutils.cpp index 445c877c..76b9ccd2 100644 --- a/src/qtgui/guiutils.cpp +++ b/src/qtgui/guiutils.cpp @@ -14,6 +14,7 @@ * Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include "autoconfig.h" #include #include diff --git a/src/qtgui/ptrans_w.cpp b/src/qtgui/ptrans_w.cpp index c1338f2a..ca98fbdf 100644 --- a/src/qtgui/ptrans_w.cpp +++ b/src/qtgui/ptrans_w.cpp @@ -14,6 +14,7 @@ * Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include "autoconfig.h" #include diff --git a/src/qtgui/rclzg.cpp b/src/qtgui/rclzg.cpp index 845c1a14..15a92501 100644 --- a/src/qtgui/rclzg.cpp +++ b/src/qtgui/rclzg.cpp @@ -16,6 +16,8 @@ */ #ifdef USE_ZEITGEIST +#include "autoconfig.h" + #include "rclzg.h" #include "debuglog.h" diff --git a/src/qtgui/viewaction_w.cpp b/src/qtgui/viewaction_w.cpp index e3cb4792..e6802e39 100644 --- a/src/qtgui/viewaction_w.cpp +++ b/src/qtgui/viewaction_w.cpp @@ -14,6 +14,7 @@ * Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include "autoconfig.h" #include diff --git a/src/query/filtseq.cpp b/src/query/filtseq.cpp index cf8f052f..2c9b1c17 100644 --- a/src/query/filtseq.cpp +++ b/src/query/filtseq.cpp @@ -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; diff --git a/src/query/plaintorich.cpp b/src/query/plaintorich.cpp index 2ad45fed..fab02e8d 100644 --- a/src/query/plaintorich.cpp +++ b/src/query/plaintorich.cpp @@ -39,16 +39,6 @@ using std::set; #include "cancelcheck.h" #include "unacpp.h" -// For debug printing -static string vecStringToString(const vector& t) -{ - string sterms; - for (vector::const_iterator it = t.begin(); it != t.end(); it++) { - sterms += "[" + *it + "] "; - } - return sterms; -} - struct MatchEntry { // Start/End byte offsets in the document text pair offs; diff --git a/src/rcldb/rclabstract.cpp b/src/rcldb/rclabstract.cpp index dc0fa3ca..2d7111c7 100644 --- a/src/rcldb/rclabstract.cpp +++ b/src/rcldb/rclabstract.cpp @@ -173,7 +173,6 @@ double Query::Native::qualityTerms(Xapian::docid docid, map > byRoot; for (vector::const_iterator qit = terms.begin(); qit != terms.end(); qit++) { - bool found = false; map::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 > byQ; - double totalweight = qualityTerms(docid, terms, byQ); for (multimap >::reverse_iterator mit = byQ.rbegin(); mit != byQ.rend(); mit++) { diff --git a/src/rcldb/rcldb.cpp b/src/rcldb/rcldb.cpp index 054d3027..7be84f5a 100644 --- a/src/rcldb/rcldb.cpp +++ b/src/rcldb/rcldb.cpp @@ -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), diff --git a/src/rcldb/rclterms.cpp b/src/rcldb/rclterms.cpp index 8a7b61d6..bd2eebba 100644 --- a/src/rcldb/rclterms.cpp +++ b/src/rcldb/rclterms.cpp @@ -132,18 +132,6 @@ public: } }; -/** Add prefix to all strings in list. - * @param prefix already wrapped prefix - */ -static void addPrefix(vector& terms, const string& prefix) -{ - if (prefix.empty()) - return; - for (vector::iterator it = terms.begin(); - it != terms.end(); it++) - it->term.insert(0, prefix); -} - static const char *tmtptostr(int typ) { switch (typ) {