forked from Mirror/frr
lib: apply more printf
attributes
... missed some functions in the earlier commits :( Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
aa16204dfb
commit
c695bdbedb
7
lib/db.h
7
lib/db.h
|
@ -36,21 +36,24 @@
|
|||
#define _FRR_DB_H_
|
||||
#ifdef HAVE_SQLITE3
|
||||
|
||||
#include "compiler.h"
|
||||
#include <sqlite3.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern int db_init(const char *path_fmt, ...);
|
||||
extern int db_init(const char *path_fmt, ...) PRINTFRR(1, 2);
|
||||
extern int db_close(void);
|
||||
/* WARNING: sqlite format string! not printf compatible! */
|
||||
extern int db_bindf(struct sqlite3_stmt *ss, const char *fmt, ...);
|
||||
extern struct sqlite3_stmt *db_prepare_len(const char *stmt, int stmtlen);
|
||||
extern struct sqlite3_stmt *db_prepare(const char *stmt);
|
||||
extern int db_run(struct sqlite3_stmt *ss);
|
||||
/* WARNING: sqlite format string! not scanf compatible! */
|
||||
extern int db_loadf(struct sqlite3_stmt *ss, const char *fmt, ...);
|
||||
extern void db_finalize(struct sqlite3_stmt **ss);
|
||||
extern int db_execute(const char *stmt_fmt, ...);
|
||||
extern int db_execute(const char *stmt_fmt, ...) PRINTFRR(1, 2);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -71,8 +71,8 @@ struct xrefdata_logmsg {
|
|||
* determine whether something is a log message or something else.
|
||||
*/
|
||||
|
||||
extern void vzlogx(const struct xref_logmsg *xref, int prio,
|
||||
const char *fmt, va_list ap);
|
||||
extern void vzlogx(const struct xref_logmsg *xref, int prio, const char *fmt,
|
||||
va_list ap) PRINTFRR(3, 0);
|
||||
#define vzlog(prio, ...) vzlogx(NULL, prio, __VA_ARGS__)
|
||||
|
||||
PRINTFRR(2, 3)
|
||||
|
|
Loading…
Reference in a new issue