policycoreutils: add noreturn attribute to usage()
Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
parent
28a6a560fa
commit
cd20f9c257
6 changed files with 6 additions and 6 deletions
|
@ -46,7 +46,7 @@ static void log_err(const char *fmt, ...)
|
|||
}
|
||||
}
|
||||
|
||||
static void usage(int err)
|
||||
static __attribute__((__noreturn__)) void usage(int err)
|
||||
{
|
||||
fprintf(stderr, "Usage: %s [OPTIONS] [IN_FILE [OUT_FILE]]\n", progname);
|
||||
fprintf(stderr, "\n");
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#define PACKAGE "policycoreutils" /* the name of this package lang translation */
|
||||
#endif
|
||||
|
||||
void usage(char *progname)
|
||||
static __attribute__((__noreturn__)) void usage(const char *progname)
|
||||
{
|
||||
fprintf(stderr, _("usage: %s [-qi]\n"), progname);
|
||||
exit(1);
|
||||
|
|
|
@ -73,7 +73,7 @@ struct {
|
|||
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
|
||||
FALSE, FALSE, FALSE, OPTS_FROM_ARG, {0} } };
|
||||
|
||||
static void usage(const char *name, int exit_code)
|
||||
static __attribute__((__noreturn__)) void usage(const char *name, int exit_code)
|
||||
{
|
||||
fprintf(exit_code ? stderr : stdout,
|
||||
" Usage: %s [-%s] [ context | - ]\n"
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include "restore.h"
|
||||
|
||||
static void usage(const char *progname)
|
||||
static __attribute__((__noreturn__)) void usage(const char *progname)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"\nusage: %s [-vnrmdD] [-e directory] [-f specfile] pathname\n"
|
||||
|
|
|
@ -39,7 +39,7 @@ static int iamrestorecon;
|
|||
static int ctx_validate; /* Validate contexts */
|
||||
static const char *altpath; /* Alternate path to file_contexts */
|
||||
|
||||
void usage(const char *const name)
|
||||
static __attribute__((__noreturn__)) void usage(const char *const name)
|
||||
{
|
||||
if (iamrestorecon) {
|
||||
fprintf(stderr,
|
||||
|
|
|
@ -23,7 +23,7 @@ int verbose = 0;
|
|||
|
||||
int setbool(char **list, size_t start, size_t end);
|
||||
|
||||
void usage(void)
|
||||
static __attribute__((__noreturn__)) void usage(void)
|
||||
{
|
||||
fputs
|
||||
("\nUsage: setsebool [ -NPV ] boolean value | bool1=val1 bool2=val2...\n\n",
|
||||
|
|
Loading…
Reference in a new issue