summaryrefslogtreecommitdiff
path: root/res/res_config_sqlite.c
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2008-11-29 15:29:33 +0000
committerKevin P. Fleming <kpfleming@digium.com>2008-11-29 15:29:33 +0000
commit9a7c28cd5aeb577740ccb37e9e740a177223a762 (patch)
tree0c50e9e344a11805bfd2a56caef7d8350f2156c4 /res/res_config_sqlite.c
parent445c5296da9c1dede150d945a6794e3085ad37e8 (diff)
we can now build with -Wformat=2, which found a couple of real bugs
because SPRINTF() use non-literal format strings (which cannot be checked), move it into its own module so the rest of func_strings can benefit from format string checking git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_config_sqlite.c')
-rw-r--r--res/res_config_sqlite.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/res/res_config_sqlite.c b/res/res_config_sqlite.c
index ff3c416cc..5f72abc9a 100644
--- a/res/res_config_sqlite.c
+++ b/res/res_config_sqlite.c
@@ -555,8 +555,7 @@ static char *sql_create_cdr_table =
/*!
* SQL query format to describe the table structure
*/
-static char *sql_table_structure =
-"SELECT sql FROM sqlite_master WHERE type='table' AND tbl_name='%s'";
+#define sql_table_structure "SELECT sql FROM sqlite_master WHERE type='table' AND tbl_name='%s'"
/*!
* SQL query format to fetch the static configuration of a file.
@@ -564,11 +563,11 @@ static char *sql_table_structure =
*
* \see add_cfg_entry()
*/
-static const char *sql_get_config_table =
-"SELECT *"
-" FROM '%q'"
-" WHERE filename = '%q' AND commented = 0"
-" ORDER BY cat_metric ASC, var_metric ASC;";
+#define sql_get_config_table \
+ "SELECT *" \
+ " FROM '%q'" \
+ " WHERE filename = '%q' AND commented = 0" \
+ " ORDER BY cat_metric ASC, var_metric ASC;"
static void free_table(struct sqlite_cache_tables *tblptr)
{