getopt: misc cleanups for compiler warning
getopt.c:124:1: warning: function 'usage' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
This commit is contained in:
parent
8c8a219e71
commit
7406d7acad
2 changed files with 3 additions and 2 deletions
|
@ -39,7 +39,6 @@ struct lgetopt
|
||||||
|
|
||||||
extern struct lgetopt myopts[];
|
extern struct lgetopt myopts[];
|
||||||
|
|
||||||
void usage(char *);
|
|
||||||
void parseargs(int *, char ***, struct lgetopt *);
|
void parseargs(int *, char ***, struct lgetopt *);
|
||||||
|
|
||||||
#endif /* __GETOPT_H_INCLUDED__ */
|
#endif /* __GETOPT_H_INCLUDED__ */
|
||||||
|
|
|
@ -30,6 +30,8 @@
|
||||||
|
|
||||||
# define OPTCHAR '-'
|
# define OPTCHAR '-'
|
||||||
|
|
||||||
|
static void usage(char *name) __attribute__((noreturn));
|
||||||
|
|
||||||
void
|
void
|
||||||
parseargs(int *argc, char ***argv, struct lgetopt *opts)
|
parseargs(int *argc, char ***argv, struct lgetopt *opts)
|
||||||
{
|
{
|
||||||
|
@ -119,7 +121,7 @@ parseargs(int *argc, char ***argv, struct lgetopt *opts)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
usage(char *name)
|
usage(char *name)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
Loading…
Reference in a new issue