From fa5f6835e00c4927cae051328642b2a5a0d8b1c1 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Thu, 20 Apr 2017 03:40:44 +0300 Subject: libacl: Fix acl_from_text() returning NULL on all input Commit 5dac69ce914202c587f00da638123403111ca673 introduced a regression: apparently, gcc treats #pragma GCC diagnostic pop as a kind of statement, so this causes parse_acl_entry() to return -1 unconditionally, and therefore causes acl_from_text() to return NULL unconditionally, too. Fix this by moving the pragma after the "if" statement. Reported-by: Valery Inozemtsev --- libacl/acl_from_text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libacl/acl_from_text.c b/libacl/acl_from_text.c index bb2ab04..09790c9 100644 --- a/libacl/acl_from_text.c +++ b/libacl/acl_from_text.c @@ -307,8 +307,8 @@ create_entry: #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; +#pragma GCC diagnostic pop return 0; fail: -- cgit v1.2.1