diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2016-03-02 12:54:47 +0100 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2016-03-02 12:59:28 +0100 |
commit | 5dac69ce914202c587f00da638123403111ca673 (patch) | |
tree | 26c70835feebf8ec099053af08ac610ec6e0d058 | |
parent | 6154283874a29bc7bcd4b089f12a038f41625dbc (diff) | |
download | acl-5dac69ce914202c587f00da638123403111ca673.tar.gz |
libacl: Ignore warning in parse_acl_entry()
In this function, we call int2ext() on a temporary object on the stack.
When int2ext() checks for a NULL pointer, gcc's -Waddress warning points
out that the address of the temporary object can never be NULL, which is
correct but not helpful:
warning: the address of 'entry_obj' will always evaluate as 'true' [-Waddress]
Suppress this warning.
-rw-r--r-- | libacl/acl_from_text.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libacl/acl_from_text.c b/libacl/acl_from_text.c index fb6bc07..bb2ab04 100644 --- a/libacl/acl_from_text.c +++ b/libacl/acl_from_text.c @@ -304,7 +304,10 @@ parse_acl_entry(const char **text_p, acl_t *acl_p) create_entry: if (acl_create_entry(acl_p, &entry_d) != 0) return -1; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Waddress" if (acl_copy_entry(entry_d, int2ext(&entry_obj)) != 0) +#pragma GCC diagnostic pop return -1; return 0; |