mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-05-16 06:01:40 +02:00
Fixes for gcc version 8 compatibility.
This commit is contained in:
@@ -782,7 +782,7 @@ string PolicyCompiler_pix::printPreambleCommands()
|
||||
|
||||
try
|
||||
{
|
||||
InetAddr(addr);
|
||||
(void) InetAddr(addr);
|
||||
} catch(FWException &ex)
|
||||
{
|
||||
abort("Invalid address for management subnet: '"+addr+"'");
|
||||
|
||||
@@ -888,7 +888,7 @@ int main(int argc, char * const *argv)
|
||||
} catch (std::string s) {
|
||||
cerr << s;
|
||||
exit(1);
|
||||
} catch (std::exception ex) {
|
||||
} catch (std::exception &ex) {
|
||||
cerr << ex.what();
|
||||
exit(1);
|
||||
} catch (...) {
|
||||
|
||||
@@ -179,7 +179,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
cerr << s << endl;
|
||||
return 1;
|
||||
} catch (std::exception ex)
|
||||
} catch (std::exception &ex)
|
||||
{
|
||||
cerr << "exception: " << ex.what() << endl;
|
||||
return 1;
|
||||
|
||||
@@ -104,7 +104,7 @@ void AutomaticRules_ipt::addConntrackRule()
|
||||
|
||||
try
|
||||
{
|
||||
InetAddr(addr);
|
||||
(void) InetAddr(addr);
|
||||
} catch (FWException &ex)
|
||||
{
|
||||
try
|
||||
|
||||
@@ -179,7 +179,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
cerr << s << endl;
|
||||
return 1;
|
||||
} catch (std::exception ex)
|
||||
} catch (std::exception &ex)
|
||||
{
|
||||
cerr << "exception: " << ex.what() << endl;
|
||||
return 1;
|
||||
|
||||
@@ -567,7 +567,7 @@ PolicyCompiler::find_more_specific_rule(
|
||||
return j;
|
||||
}
|
||||
|
||||
} catch (FWException ex) {
|
||||
} catch (FWException &ex) {
|
||||
cerr << " *** Exception: " << ex.toString() << endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -957,13 +957,13 @@ static bool filterMatchesIpAddress(const QStringList &args,
|
||||
InetAddr ipv4addr(rx.cap(1).toStdString());
|
||||
InetAddr ipv4mask(netmask);
|
||||
searchAddrAndMask = InetAddrMask(ipv4addr, ipv4mask);
|
||||
} catch (const FWException) { // Could not create IPv4 object. Trying IPv6.
|
||||
} catch (const FWException &) { // Could not create IPv4 object. Trying IPv6.
|
||||
try {
|
||||
int netmask = rx.cap(2).isEmpty() ? 128 : rx.cap(2).toInt();
|
||||
InetAddr ipv6addr(AF_INET6, rx.cap(1).toStdString());
|
||||
InetAddr ipv6mask(AF_INET6, netmask);
|
||||
searchAddrAndMask = InetAddrMask(ipv6addr, ipv6mask);
|
||||
} catch (const FWException) { // Could not create IPv6 object.
|
||||
} catch (const FWException &) { // Could not create IPv6 object.
|
||||
// User did not submit a valid IP address
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
cerr << s << endl;
|
||||
return 1;
|
||||
} catch (std::exception ex)
|
||||
} catch (std::exception &ex)
|
||||
{
|
||||
cerr << "exception: " << ex.what() << endl;
|
||||
return 1;
|
||||
|
||||
@@ -179,7 +179,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
cerr << s << endl;
|
||||
return 1;
|
||||
} catch (std::exception ex)
|
||||
} catch (std::exception &ex)
|
||||
{
|
||||
cerr << "exception: " << ex.what() << endl;
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user