mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-06-24 01:49:36 +02:00
fix: Ignore some -Woverloaded-virtual warnings
Some of these classes needs refactoring to not trigger the warning. As a few of them are core classes, this needs further inspection.
This commit is contained in:
@@ -510,9 +510,12 @@ public:
|
||||
fwcompiler::OSConfigurator *_oscnf);
|
||||
virtual ~PolicyCompiler_cisco() {}
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Woverloaded-virtual"
|
||||
virtual std::string createRuleLabel(const std::string &txt,
|
||||
libfwbuilder::Interface *iface,
|
||||
int rule_num);
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
virtual int prolog();
|
||||
virtual void compile();
|
||||
|
||||
@@ -155,7 +155,10 @@ public:
|
||||
// and does final clean up.
|
||||
virtual libfwbuilder::Firewall* finalize();
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Woverloaded-virtual"
|
||||
virtual libfwbuilder::FWObject* makeAddressObj(AddressSpec &as);
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
virtual void addSrc();
|
||||
virtual void addDst();
|
||||
|
||||
@@ -193,7 +193,10 @@ public:
|
||||
virtual void* dispatch(libfwbuilder::DNSName*, void*);
|
||||
virtual void* dispatch(libfwbuilder::ObjectGroup*, void*);
|
||||
virtual void* dispatch(libfwbuilder::ServiceGroup*, void*);
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Woverloaded-virtual"
|
||||
virtual void* dispatch(libfwbuilder::AttachedNetworks*, void*);
|
||||
#pragma clang diagnostic pop
|
||||
virtual void* dispatch(libfwbuilder::UserService*, void*);
|
||||
virtual void* dispatch(libfwbuilder::DynamicGroup*, void*);
|
||||
|
||||
|
||||
@@ -109,8 +109,9 @@ bool FWReference::cmp(const FWObject *obj, bool /* UNUSED recursive */) throw(FW
|
||||
return true;
|
||||
}
|
||||
|
||||
void FWReference::add(FWObject*)
|
||||
void FWReference::add(FWObject*,bool validate)
|
||||
{
|
||||
(void) validate; // Unused
|
||||
throw std::string("Can't add to a reference !");
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
|
||||
virtual bool cmp(const FWObject *obj, bool recursive=false) throw(FWException);
|
||||
|
||||
virtual void add(FWObject *obj);
|
||||
virtual void add(FWObject *obj,bool validate=true);
|
||||
|
||||
virtual FWObject *getPointer();
|
||||
virtual int getPointerId();
|
||||
|
||||
@@ -1044,7 +1044,7 @@ RuleElementRItf* RoutingRule::getRItf() const
|
||||
}
|
||||
|
||||
|
||||
bool RoutingRule::isEmpty() const
|
||||
bool RoutingRule::isEmpty()
|
||||
{
|
||||
RuleElement *rdst=getRDst();
|
||||
RuleElement *rgtw=getRGtw();
|
||||
|
||||
@@ -460,7 +460,7 @@ class RoutingRule : public Rule
|
||||
|
||||
virtual FWOptions* getOptionsObject() const;
|
||||
virtual RuleSet* getBranch();
|
||||
virtual bool isEmpty() const;
|
||||
virtual bool isEmpty();
|
||||
|
||||
int getMetric() const;
|
||||
void setMetric(int metric);
|
||||
|
||||
@@ -1001,7 +1001,11 @@ public:
|
||||
Compiler(libfwbuilder::FWObjectDatabase *_db,
|
||||
libfwbuilder::Firewall *fw, bool ipv6_policy,
|
||||
fwcompiler::OSConfigurator *_oscnf);
|
||||
|
||||
/*
|
||||
* TODO: Refactor Compiler to not hide BaseCompiler
|
||||
*/
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Woverloaded-virtual"
|
||||
Compiler(libfwbuilder::FWObjectDatabase *_db, bool ipv6_policy);
|
||||
|
||||
/**
|
||||
@@ -1016,6 +1020,7 @@ public:
|
||||
|
||||
virtual void warning(const std::string &errstr);
|
||||
virtual void warning(libfwbuilder::FWObject *rule, const std::string &errstr);
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
void setDebugLevel(int dl) { debug=dl; }
|
||||
void setDebugRule(int dr) { debug_rule = dr; rule_debug_on = true; }
|
||||
|
||||
@@ -62,7 +62,16 @@ SSHJunos::SSHJunos(QWidget *_par,
|
||||
enable_prompt="> $"; // operational prompt
|
||||
config_prompt="# $"; // configuration prompt
|
||||
pwd_prompt_1="'s password: $";
|
||||
/*
|
||||
* TODO
|
||||
* Do not change pwd_prompt_2 without extensive testing
|
||||
* This must be tested on actual hardware/os
|
||||
* Will prevent login on wrong regex, with silent error - timeout
|
||||
*/
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunknown-escape-sequence"
|
||||
pwd_prompt_2="Password:\w?";
|
||||
#pragma clang diagnostic pop
|
||||
epwd_prompt="Password: ";
|
||||
ssh_pwd_prompt="'s password: ";
|
||||
ssoft_config_prompt="> ";
|
||||
|
||||
@@ -71,7 +71,10 @@ public:
|
||||
libfwbuilder::FWObject* getLibrary(QModelIndex idx);
|
||||
libfwbuilder::FWObject* getLibrary(int row);
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Woverloaded-virtual"
|
||||
void setData(QModelIndex idx, const QString &name, libfwbuilder::FWObject *lib, ObjectTreeView *otv);
|
||||
#pragma clang diagnostic pop
|
||||
void setName(QModelIndex idx, const QString &name);
|
||||
|
||||
ObjectTreeView* getTreeWidget(QModelIndex idx);
|
||||
|
||||
@@ -235,7 +235,10 @@ namespace fwcompiler {
|
||||
virtual std::string _printPort(int rs,int re,bool neg=false);
|
||||
virtual void _printWith(libfwbuilder::Service *srv);
|
||||
virtual void _printAction(libfwbuilder::PolicyRule *r);
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Woverloaded-virtual"
|
||||
virtual void _printAddr(libfwbuilder::Address *o,bool neg=false);
|
||||
#pragma clang diagnostic pop
|
||||
virtual void _printDstService(libfwbuilder::RuleElement *o);
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user