summaryrefslogtreecommitdiffstats
path: root/lib/db.h
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2023-01-31 21:58:41 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2023-02-01 03:00:18 +0100
commitc695bdbedb9b377755bc4fd7ca5215e8f9ba9758 (patch)
tree6e4a3dccff90211e8ce6c29963aa3a2b4b072855 /lib/db.h
parentMerge pull request #12667 from donaldsharp/zebra_rib_fixup (diff)
downloadfrr-c695bdbedb9b377755bc4fd7ca5215e8f9ba9758.tar.xz
frr-c695bdbedb9b377755bc4fd7ca5215e8f9ba9758.zip
lib: apply more `printf` attributes
... missed some functions in the earlier commits :( Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/db.h')
-rw-r--r--lib/db.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/db.h b/lib/db.h
index 884c7377f..c8ce7fe57 100644
--- a/lib/db.h
+++ b/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
}