mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
parser/libapparmor_re: remove unnecessary throw(int)
Compiling the parser currently prints a deprecation warning. Remove throw(int) annotations from function signatures. These aren't required to catch exceptions. For example, the following program catches the exception without a throw(int) annotation: #include <iostream> void throw_an_error() { throw 3; return; } int main () { try { throw_an_error(); } catch (int e) { std::cout << "caught exception " << e << '\n'; } return 0; } This program prints: $ g++ -o error error.cc $ ./error caught exception 3 Signed-off-by: Eric Chiang <ericchiang@google.com>
This commit is contained in:
parent
dc010bc034
commit
48dcbb9dcb
1 changed files with 2 additions and 2 deletions
|
@ -44,7 +44,7 @@ typedef list<State *> Partition;
|
|||
|
||||
class perms_t {
|
||||
public:
|
||||
perms_t(void) throw(int): allow(0), deny(0), audit(0), quiet(0), exact(0) { };
|
||||
perms_t(void): allow(0), deny(0), audit(0), quiet(0), exact(0) { };
|
||||
|
||||
bool is_accept(void) { return (allow | audit | quiet); }
|
||||
|
||||
|
@ -192,7 +192,7 @@ struct DiffDag {
|
|||
*/
|
||||
class State {
|
||||
public:
|
||||
State(int l, ProtoState &n, State *other) throw(int):
|
||||
State(int l, ProtoState &n, State *other):
|
||||
label(l), flags(0), perms(), trans()
|
||||
{
|
||||
int error;
|
||||
|
|
Loading…
Add table
Reference in a new issue