From fecde4d89dcbb63d4ec25b76251b6a13724ea791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Pettersson?= Date: Thu, 20 Nov 2014 11:22:30 +0100 Subject: [PATCH] Only print SQLite debug messages when compiled for it. --- src/twc-sqlite.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/twc-sqlite.c b/src/twc-sqlite.c index 0e8a57d..32bf3f2 100644 --- a/src/twc-sqlite.c +++ b/src/twc-sqlite.c @@ -34,12 +34,16 @@ sqlite3 *twc_sqlite_db = NULL; struct t_twc_list *twc_sqlite_statements = NULL; +#ifdef TWC_DEBUG #define TWC_SQLITE_DEBUG_RC(rc, expected_rc) \ if (rc != expected_rc) \ weechat_printf(NULL, \ "%s%s: SQLite error in %s: error code %d", \ weechat_prefix("error"), weechat_plugin->name, \ - __func__, rc); \ + __func__, rc); +#else +#define TWC_SQLITE_DEBUG_RC(rc, expected_rc) (void)rc; +#endif // TWC_DEBUG /** * Create or reset an SQLite statement.