diff mbox

[1/2] libselinux/utils: add noreturn attribute to selinux_check_access's usage

Message ID 20170503205802.19751-1-nicolas.iooss@m4x.org (mailing list archive)
State Not Applicable
Headers show

Commit Message

Nicolas Iooss May 3, 2017, 8:58 p.m. UTC
When building libselinux, clang reports the following warning:

    selinux_check_access.c:8:1: error: function 'usage' could be
    declared with attribute 'noreturn' [-Werror,-Wmissing-noreturn]

While at it, make progname const.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
---
 libselinux/utils/selinux_check_access.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/libselinux/utils/selinux_check_access.c b/libselinux/utils/selinux_check_access.c
index 88762b48c5d2..6cea40e9f059 100644
--- a/libselinux/utils/selinux_check_access.c
+++ b/libselinux/utils/selinux_check_access.c
@@ -4,7 +4,7 @@ 
 #include <unistd.h>
 #include <selinux/selinux.h>
 
-static void usage(char *progname)
+static __attribute__ ((__noreturn__)) void usage(const char *progname)
 {
 	fprintf(stderr, "usage:  %s [-a auditdata] scon tcon class perm\n"
 		"\nWhere:\n\t"