mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-22 08:09:19 +02:00
Add prototypes for vwarn/vwarnx
Fixes this warning: common.c:406:1: warning: no previous prototype for 'vwarn' [-Wmissing-prototypes] 406 | vwarn(const char *fmt, va_list list) | ^~~~~ common.c:429:1: warning: no previous prototype for 'vwarnx' [-Wmissing-prototypes] 429 | vwarnx(const char *fmt, va_list list) | ^~~~~~ Also move err() to have non-x versions first.
This commit is contained in:
parent
6a7763c210
commit
dc307b7183
22
src/common.c
22
src/common.c
|
@ -425,6 +425,17 @@ warn(const char *fmt, ...)
|
|||
va_end(list);
|
||||
}
|
||||
|
||||
void
|
||||
err(int eval, const char *fmt, ...)
|
||||
{
|
||||
va_list list;
|
||||
|
||||
va_start(list, fmt);
|
||||
vwarn(fmt, list);
|
||||
va_end(list);
|
||||
exit(eval);
|
||||
}
|
||||
|
||||
void
|
||||
vwarnx(const char *fmt, va_list list)
|
||||
{
|
||||
|
@ -442,17 +453,6 @@ warnx(const char *fmt, ...)
|
|||
va_end(list);
|
||||
}
|
||||
|
||||
void
|
||||
err(int eval, const char *fmt, ...)
|
||||
{
|
||||
va_list list;
|
||||
|
||||
va_start(list, fmt);
|
||||
vwarn(fmt, list);
|
||||
va_end(list);
|
||||
exit(eval);
|
||||
}
|
||||
|
||||
void
|
||||
errx(int eval, const char *fmt, ...)
|
||||
{
|
||||
|
|
|
@ -132,10 +132,12 @@ int check_topdomain(char *, char **);
|
|||
int inet_aton(const char *cp, struct in_addr *inp);
|
||||
#endif
|
||||
|
||||
void err(int eval, const char *fmt, ...);
|
||||
void vwarn(const char *fmt, va_list list);
|
||||
void warn(const char *fmt, ...);
|
||||
void errx(int eval, const char *fmt, ...);
|
||||
void err(int eval, const char *fmt, ...);
|
||||
void vwarnx(const char *fmt, va_list list);
|
||||
void warnx(const char *fmt, ...);
|
||||
void errx(int eval, const char *fmt, ...);
|
||||
#endif
|
||||
|
||||
int recent_seqno(int , int);
|
||||
|
|
Loading…
Reference in New Issue