1
0
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:
Patrick Monnerat
2018-03-06 02:52:11 +01:00
parent 10fd1f5425
commit df47f15219
9 changed files with 10 additions and 10 deletions

View File

@@ -782,7 +782,7 @@ string PolicyCompiler_pix::printPreambleCommands()
try
{
InetAddr(addr);
(void) InetAddr(addr);
} catch(FWException &ex)
{
abort("Invalid address for management subnet: '"+addr+"'");

View File

@@ -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 (...) {

View File

@@ -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;

View File

@@ -104,7 +104,7 @@ void AutomaticRules_ipt::addConntrackRule()
try
{
InetAddr(addr);
(void) InetAddr(addr);
} catch (FWException &ex)
{
try

View File

@@ -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;

View File

@@ -567,7 +567,7 @@ PolicyCompiler::find_more_specific_rule(
return j;
}
} catch (FWException ex) {
} catch (FWException &ex) {
cerr << " *** Exception: " << ex.toString() << endl;
}
}

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -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;