mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-13 01:08:41 -09:00
Add format attribute to printf like functions
This commit is contained in:
parent
9801f46ece
commit
47b0261933
3 changed files with 9 additions and 1 deletions
4
deps/yopt.h
vendored
4
deps/yopt.h
vendored
|
|
@ -113,7 +113,9 @@ static inline const yopt_opt_t *_yopt_find(const yopt_opt_t *o, const char *v) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
__attribute__((format(printf,3,4)))
|
||||||
|
#endif
|
||||||
static inline int _yopt_err(yopt_t *o, char **val, const char *fmt, ...) {
|
static inline int _yopt_err(yopt_t *o, char **val, const char *fmt, ...) {
|
||||||
va_list va;
|
va_list va;
|
||||||
va_start(va, fmt);
|
va_start(va, fmt);
|
||||||
|
|
|
||||||
|
|
@ -128,6 +128,9 @@ void dir_setlasterr(const char *);
|
||||||
|
|
||||||
/* Error message on fatal error, or NULL if there hasn't been a fatal error yet. */
|
/* Error message on fatal error, or NULL if there hasn't been a fatal error yet. */
|
||||||
extern char *dir_fatalerr;
|
extern char *dir_fatalerr;
|
||||||
|
#ifdef __GNUC__
|
||||||
|
__attribute__((format(printf,1,2)))
|
||||||
|
#endif
|
||||||
void dir_seterr(const char *, ...);
|
void dir_seterr(const char *, ...);
|
||||||
|
|
||||||
extern int dir_ui;
|
extern int dir_ui;
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,9 @@ int ncresize(int, int);
|
||||||
void nccreate(int, int, const char *);
|
void nccreate(int, int, const char *);
|
||||||
|
|
||||||
/* printf something somewhere in the last created window */
|
/* printf something somewhere in the last created window */
|
||||||
|
#ifdef __GNUC__
|
||||||
|
__attribute__((format(printf,3,4)))
|
||||||
|
#endif
|
||||||
void ncprint(int, int, const char *, ...);
|
void ncprint(int, int, const char *, ...);
|
||||||
|
|
||||||
/* Add a "tab" to a window */
|
/* Add a "tab" to a window */
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue