suppress misc warnings on fedora and macosx
This commit is contained in:
parent
3163f18fdd
commit
33e1847b26
@ -70,8 +70,8 @@ class MimeHandlerExec : public RecollFilter {
|
|||||||
|
|
||||||
MimeHandlerExec(RclConfig *cnf, const std::string& id);
|
MimeHandlerExec(RclConfig *cnf, const std::string& id);
|
||||||
|
|
||||||
virtual bool next_document();
|
virtual bool next_document() override;
|
||||||
virtual bool skip_to_document(const std::string& ipath);
|
virtual bool skip_to_document(const std::string& ipath) override;
|
||||||
|
|
||||||
virtual void clear_impl() override {
|
virtual void clear_impl() override {
|
||||||
m_fn.erase();
|
m_fn.erase();
|
||||||
@ -80,7 +80,7 @@ class MimeHandlerExec : public RecollFilter {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool set_document_file_impl(const std::string& mt,
|
virtual bool set_document_file_impl(const std::string& mt,
|
||||||
const std::string& file_path);
|
const std::string& file_path) override;
|
||||||
|
|
||||||
std::string m_fn;
|
std::string m_fn;
|
||||||
std::string m_ipath;
|
std::string m_ipath;
|
||||||
|
|||||||
@ -108,14 +108,14 @@ class MimeHandlerExecMultiple : public MimeHandlerExec {
|
|||||||
// No resources to clean up, the ExecCmd destructor does it.
|
// No resources to clean up, the ExecCmd destructor does it.
|
||||||
virtual ~MimeHandlerExecMultiple() {}
|
virtual ~MimeHandlerExecMultiple() {}
|
||||||
|
|
||||||
virtual bool next_document();
|
virtual bool next_document() override;
|
||||||
|
|
||||||
// skip_to and clear inherited from MimeHandlerExec
|
// skip_to and clear inherited from MimeHandlerExec
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// This is the only 2nd-level derived handler class. Use call-super.
|
// This is the only 2nd-level derived handler class. Use call-super.
|
||||||
virtual bool set_document_file_impl(const std::string& mt,
|
virtual bool set_document_file_impl(const std::string& mt,
|
||||||
const std::string &file_path) {
|
const std::string &file_path) override {
|
||||||
m_filefirst = true;
|
m_filefirst = true;
|
||||||
return MimeHandlerExec::set_document_file_impl(mt, file_path);
|
return MimeHandlerExec::set_document_file_impl(mt, file_path);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,12 +31,12 @@ class MimeHandlerHtml : public RecollFilter {
|
|||||||
}
|
}
|
||||||
virtual ~MimeHandlerHtml() {}
|
virtual ~MimeHandlerHtml() {}
|
||||||
|
|
||||||
virtual bool is_data_input_ok(DataInput input) const {
|
virtual bool is_data_input_ok(DataInput input) const override {
|
||||||
if (input == DOCUMENT_FILE_NAME || input == DOCUMENT_STRING)
|
if (input == DOCUMENT_FILE_NAME || input == DOCUMENT_STRING)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
virtual bool next_document();
|
virtual bool next_document() override;
|
||||||
const std::string& get_html() {
|
const std::string& get_html() {
|
||||||
return m_html;
|
return m_html;
|
||||||
}
|
}
|
||||||
@ -46,9 +46,9 @@ class MimeHandlerHtml : public RecollFilter {
|
|||||||
}
|
}
|
||||||
protected:
|
protected:
|
||||||
virtual bool set_document_file_impl(const std::string& mt,
|
virtual bool set_document_file_impl(const std::string& mt,
|
||||||
const std::string &file_path);
|
const std::string &file_path) override;
|
||||||
virtual bool set_document_string_impl(const std::string& mt,
|
virtual bool set_document_string_impl(const std::string& mt,
|
||||||
const std::string &data);
|
const std::string &data) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string m_filename;
|
std::string m_filename;
|
||||||
|
|||||||
@ -37,18 +37,18 @@ class MimeHandlerMail : public RecollFilter {
|
|||||||
public:
|
public:
|
||||||
MimeHandlerMail(RclConfig *cnf, const std::string &id);
|
MimeHandlerMail(RclConfig *cnf, const std::string &id);
|
||||||
virtual ~MimeHandlerMail();
|
virtual ~MimeHandlerMail();
|
||||||
virtual bool is_data_input_ok(DataInput input) const {
|
virtual bool is_data_input_ok(DataInput input) const override {
|
||||||
return (input == DOCUMENT_FILE_NAME || input == DOCUMENT_STRING);
|
return (input == DOCUMENT_FILE_NAME || input == DOCUMENT_STRING);
|
||||||
}
|
}
|
||||||
virtual bool next_document();
|
virtual bool next_document() override;
|
||||||
virtual bool skip_to_document(const std::string& ipath);
|
virtual bool skip_to_document(const std::string& ipath) override;
|
||||||
virtual void clear_impl() override;
|
virtual void clear_impl() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool set_document_file_impl(const std::string& mt,
|
virtual bool set_document_file_impl(const std::string& mt,
|
||||||
const std::string& file_path);
|
const std::string& file_path) override;
|
||||||
virtual bool set_document_string_impl(const std::string& mt,
|
virtual bool set_document_string_impl(const std::string& mt,
|
||||||
const std::string& data);
|
const std::string& data) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool processMsg(Binc::MimePart *doc, int depth);
|
bool processMsg(Binc::MimePart *doc, int depth);
|
||||||
|
|||||||
@ -34,8 +34,8 @@ public:
|
|||||||
m_lineno(0), m_fsize(0) {
|
m_lineno(0), m_fsize(0) {
|
||||||
}
|
}
|
||||||
virtual ~MimeHandlerMbox();
|
virtual ~MimeHandlerMbox();
|
||||||
virtual bool next_document();
|
virtual bool next_document() override;
|
||||||
virtual bool skip_to_document(const std::string& ipath) {
|
virtual bool skip_to_document(const std::string& ipath) override{
|
||||||
m_ipath = ipath;
|
m_ipath = ipath;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -44,7 +44,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool set_document_file_impl(const std::string&,
|
virtual bool set_document_file_impl(const std::string&,
|
||||||
const std::string&);
|
const std::string&) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string m_fn; // File name
|
std::string m_fn; // File name
|
||||||
|
|||||||
@ -36,13 +36,13 @@ public:
|
|||||||
}
|
}
|
||||||
virtual ~MimeHandlerText() {}
|
virtual ~MimeHandlerText() {}
|
||||||
|
|
||||||
virtual bool is_data_input_ok(DataInput input) const {
|
virtual bool is_data_input_ok(DataInput input) const override {
|
||||||
if (input == DOCUMENT_FILE_NAME || input == DOCUMENT_STRING)
|
if (input == DOCUMENT_FILE_NAME || input == DOCUMENT_STRING)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
virtual bool next_document();
|
virtual bool next_document() override;
|
||||||
virtual bool skip_to_document(const std::string& s);
|
virtual bool skip_to_document(const std::string& s) override;
|
||||||
virtual void clear_impl() override {
|
virtual void clear_impl() override {
|
||||||
m_paging = false;
|
m_paging = false;
|
||||||
m_text.clear();
|
m_text.clear();
|
||||||
@ -54,9 +54,9 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool set_document_file_impl(const std::string& mt,
|
virtual bool set_document_file_impl(const std::string& mt,
|
||||||
const std::string &file_path);
|
const std::string &file_path) override;
|
||||||
virtual bool set_document_string_impl(const std::string&,
|
virtual bool set_document_string_impl(const std::string&,
|
||||||
const std::string&);
|
const std::string&) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_paging{false};
|
bool m_paging{false};
|
||||||
|
|||||||
@ -36,9 +36,9 @@ class MimeHandlerXslt : public RecollFilter {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool set_document_file_impl(const std::string& mt,
|
virtual bool set_document_file_impl(const std::string& mt,
|
||||||
const std::string& file_path);
|
const std::string& file_path) override;
|
||||||
virtual bool set_document_string_impl(const std::string& mt,
|
virtual bool set_document_string_impl(const std::string& mt,
|
||||||
const std::string& data);
|
const std::string& data) override;
|
||||||
|
|
||||||
class Internal;
|
class Internal;
|
||||||
private:
|
private:
|
||||||
|
|||||||
@ -134,8 +134,7 @@ bool DocSequenceHistory::getDoc(int num, Rcl::Doc &doc, string *sh)
|
|||||||
RclDHistoryEntry& hentry = m_history[m_history.size() - 1 - num];
|
RclDHistoryEntry& hentry = m_history[m_history.size() - 1 - num];
|
||||||
|
|
||||||
if (sh) {
|
if (sh) {
|
||||||
if (m_prevtime < 0 ||
|
if (m_prevtime < 0 || abs(m_prevtime - hentry.unixtime) > 86400) {
|
||||||
abs (float(m_prevtime) - float(hentry.unixtime)) > 86400) {
|
|
||||||
m_prevtime = hentry.unixtime;
|
m_prevtime = hentry.unixtime;
|
||||||
time_t t = (time_t)(hentry.unixtime);
|
time_t t = (time_t)(hentry.unixtime);
|
||||||
*sh = string(ctime(&t));
|
*sh = string(ctime(&t));
|
||||||
|
|||||||
@ -202,7 +202,7 @@ public:
|
|||||||
virtual int clear();
|
virtual int clear();
|
||||||
|
|
||||||
virtual StatusCode getStatus() const;
|
virtual StatusCode getStatus() const;
|
||||||
virtual bool ok() const {
|
virtual bool ok() const override {
|
||||||
return getStatus() != STATUS_ERROR;
|
return getStatus() != STATUS_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -223,12 +223,12 @@ public:
|
|||||||
virtual void showall() const override;
|
virtual void showall() const override;
|
||||||
|
|
||||||
/** Return all names in given submap. */
|
/** Return all names in given submap. */
|
||||||
virtual std::vector<std::string> getNames(const std::string& sk,
|
virtual std::vector<std::string> getNames(
|
||||||
const char *pattern = 0) const;
|
const std::string& sk, const char *pattern = 0) const override;
|
||||||
|
|
||||||
/** Check if name is present in any submap. This is relatively expensive
|
/** Check if name is present in any submap. This is relatively expensive
|
||||||
* but useful for saving further processing sometimes */
|
* but useful for saving further processing sometimes */
|
||||||
virtual bool hasNameAnywhere(const std::string& nm) const;
|
virtual bool hasNameAnywhere(const std::string& nm) const override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return all subkeys
|
* Return all subkeys
|
||||||
@ -446,7 +446,7 @@ public:
|
|||||||
return get(name, value, sk, false);
|
return get(name, value, sk, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool hasNameAnywhere(const std::string& nm) const {
|
virtual bool hasNameAnywhere(const std::string& nm) const override {
|
||||||
typename std::vector<T*>::const_iterator it;
|
typename std::vector<T*>::const_iterator it;
|
||||||
for (it = m_confs.begin(); it != m_confs.end(); it++) {
|
for (it = m_confs.begin(); it != m_confs.end(); it++) {
|
||||||
if ((*it)->hasNameAnywhere(nm)) {
|
if ((*it)->hasNameAnywhere(nm)) {
|
||||||
@ -457,7 +457,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual int set(const std::string& nm, const std::string& val,
|
virtual int set(const std::string& nm, const std::string& val,
|
||||||
const std::string& sk = std::string()) {
|
const std::string& sk = std::string()) override {
|
||||||
if (!m_ok) {
|
if (!m_ok) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -487,18 +487,18 @@ public:
|
|||||||
return m_confs.front()->set(nm, val, sk);
|
return m_confs.front()->set(nm, val, sk);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int erase(const std::string& nm, const std::string& sk) {
|
virtual int erase(const std::string& nm, const std::string& sk) override {
|
||||||
return m_confs.front()->erase(nm, sk);
|
return m_confs.front()->erase(nm, sk);
|
||||||
}
|
}
|
||||||
virtual int eraseKey(const std::string& sk) {
|
virtual int eraseKey(const std::string& sk) override {
|
||||||
return m_confs.front()->eraseKey(sk);
|
return m_confs.front()->eraseKey(sk);
|
||||||
}
|
}
|
||||||
virtual bool holdWrites(bool on) {
|
virtual bool holdWrites(bool on) override {
|
||||||
return m_confs.front()->holdWrites(on);
|
return m_confs.front()->holdWrites(on);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual std::vector<std::string> getNames(const std::string& sk,
|
virtual std::vector<std::string> getNames(
|
||||||
const char *pattern = 0) const {
|
const std::string& sk, const char *pattern = 0) const override {
|
||||||
return getNames1(sk, pattern, false);
|
return getNames1(sk, pattern, false);
|
||||||
}
|
}
|
||||||
virtual std::vector<std::string> getNamesShallow(const std::string& sk,
|
virtual std::vector<std::string> getNamesShallow(const std::string& sk,
|
||||||
@ -527,10 +527,10 @@ public:
|
|||||||
return nms;
|
return nms;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual std::vector<std::string> getSubKeys() const {
|
virtual std::vector<std::string> getSubKeys() const override {
|
||||||
return getSubKeys(false);
|
return getSubKeys(false);
|
||||||
}
|
}
|
||||||
virtual std::vector<std::string> getSubKeys(bool shallow) const {
|
virtual std::vector<std::string> getSubKeys(bool shallow) const override {
|
||||||
std::vector<std::string> sks;
|
std::vector<std::string> sks;
|
||||||
typename std::vector<T*>::const_iterator it;
|
typename std::vector<T*>::const_iterator it;
|
||||||
for (it = m_confs.begin(); it != m_confs.end(); it++) {
|
for (it = m_confs.begin(); it != m_confs.end(); it++) {
|
||||||
@ -547,7 +547,7 @@ public:
|
|||||||
return sks;
|
return sks;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool ok() const {
|
virtual bool ok() const override {
|
||||||
return m_ok;
|
return m_ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -150,6 +150,9 @@ public:
|
|||||||
/// Convert \ separators to /
|
/// Convert \ separators to /
|
||||||
void path_slashize(std::string& s);
|
void path_slashize(std::string& s);
|
||||||
void path_backslashize(std::string& s);
|
void path_backslashize(std::string& s);
|
||||||
|
#include "safeunistd.h"
|
||||||
|
#else
|
||||||
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// Lock/pid file class. This is quite close to the pidfile_xxx
|
/// Lock/pid file class. This is quite close to the pidfile_xxx
|
||||||
|
|||||||
@ -54,9 +54,9 @@ public:
|
|||||||
StrWildMatcher(const std::string& exp)
|
StrWildMatcher(const std::string& exp)
|
||||||
: StrMatcher(exp) {}
|
: StrMatcher(exp) {}
|
||||||
virtual ~StrWildMatcher() {}
|
virtual ~StrWildMatcher() {}
|
||||||
virtual bool match(const std::string& val) const;
|
virtual bool match(const std::string& val) const override;
|
||||||
virtual std::string::size_type baseprefixlen() const;
|
virtual std::string::size_type baseprefixlen() const override;
|
||||||
virtual StrWildMatcher *clone() const {
|
virtual StrWildMatcher *clone() const override {
|
||||||
return new StrWildMatcher(m_sexp);
|
return new StrWildMatcher(m_sexp);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -66,10 +66,10 @@ public:
|
|||||||
StrRegexpMatcher(const std::string& exp);
|
StrRegexpMatcher(const std::string& exp);
|
||||||
virtual bool setExp(const std::string& newexp) override;
|
virtual bool setExp(const std::string& newexp) override;
|
||||||
virtual ~StrRegexpMatcher() {};
|
virtual ~StrRegexpMatcher() {};
|
||||||
virtual bool match(const std::string& val) const;
|
virtual bool match(const std::string& val) const override;
|
||||||
virtual std::string::size_type baseprefixlen() const;
|
virtual std::string::size_type baseprefixlen() const override;
|
||||||
virtual bool ok() const override;
|
virtual bool ok() const override;
|
||||||
virtual StrRegexpMatcher *clone() const {
|
virtual StrRegexpMatcher *clone() const override {
|
||||||
return new StrRegexpMatcher(m_sexp);
|
return new StrRegexpMatcher(m_sexp);
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user