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 <[email protected]>
---
libselinux/utils/selinux_check_access.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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"
--
2.12.2