Merge "addons/res_config_mysql: silense warnings about printf format errors." into 16

This commit is contained in:
Kevin Harwell 2020-02-27 14:44:29 -06:00 committed by Gerrit Code Review
commit d86cd96c87
1 changed files with 8 additions and 8 deletions

View File

@ -554,7 +554,7 @@ static struct ast_config *realtime_multi_mysql(const char *database, const char
static int update_mysql(const char *database, const char *tablename, const char *keyfield, const char *lookup, const struct ast_variable *rt_fields)
{
struct mysql_conn *dbh;
my_ulonglong numrows;
uint64_t numrows;
const struct ast_variable *field = rt_fields;
struct ast_str *sql = ast_str_thread_get(&sql_buf, 100), *buf = ast_str_thread_get(&scratch_buf, 100);
struct tables *table;
@ -641,7 +641,7 @@ static int update_mysql(const char *database, const char *tablename, const char
release_table(table);
release_database(dbh);
ast_debug(1, "MySQL RealTime: Updated %llu rows on table: %s\n", numrows, tablename);
ast_debug(1, "MySQL RealTime: Updated %" PRIu64 " rows on table: %s\n", numrows, tablename);
/* From http://dev.mysql.com/doc/mysql/en/mysql-affected-rows.html
* An integer greater than zero indicates the number of rows affected
@ -655,7 +655,7 @@ static int update_mysql(const char *database, const char *tablename, const char
static int update2_mysql(const char *database, const char *tablename, const struct ast_variable *lookup_fields, const struct ast_variable *update_fields)
{
struct mysql_conn *dbh;
my_ulonglong numrows;
uint64_t numrows;
int first;
const struct ast_variable *field;
struct ast_str *sql = ast_str_thread_get(&sql_buf, 100), *buf = ast_str_thread_get(&scratch_buf, 100);
@ -738,7 +738,7 @@ static int update2_mysql(const char *database, const char *tablename, const stru
numrows = mysql_affected_rows(&dbh->handle);
release_database(dbh);
ast_debug(1, "MySQL RealTime: Updated %llu rows on table: %s\n", numrows, tablename);
ast_debug(1, "MySQL RealTime: Updated %" PRIu64 " rows on table: %s\n", numrows, tablename);
/* From http://dev.mysql.com/doc/mysql/en/mysql-affected-rows.html
* An integer greater than zero indicates the number of rows affected
@ -810,7 +810,7 @@ static int store_mysql(const char *database, const char *table, const struct ast
static int destroy_mysql(const char *database, const char *table, const char *keyfield, const char *lookup, const struct ast_variable *rt_fields)
{
struct mysql_conn *dbh;
my_ulonglong numrows;
uint64_t numrows;
struct ast_str *sql = ast_str_thread_get(&sql_buf, 16);
struct ast_str *buf = ast_str_thread_get(&scratch_buf, 16);
const struct ast_variable *field;
@ -862,7 +862,7 @@ static int destroy_mysql(const char *database, const char *table, const char *ke
numrows = mysql_affected_rows(&dbh->handle);
release_database(dbh);
ast_debug(1, "MySQL RealTime: Deleted %llu rows on table: %s\n", numrows, table);
ast_debug(1, "MySQL RealTime: Deleted %" PRIu64 " rows on table: %s\n", numrows, table);
/* From http://dev.mysql.com/doc/mysql/en/mysql-affected-rows.html
* An integer greater than zero indicates the number of rows affected
@ -878,7 +878,7 @@ static struct ast_config *config_mysql(const char *database, const char *table,
struct mysql_conn *dbh;
MYSQL_RES *result;
MYSQL_ROW row;
my_ulonglong num_rows;
uint64_t num_rows;
struct ast_variable *new_v;
struct ast_category *cur_cat = NULL;
struct ast_str *sql = ast_str_thread_get(&sql_buf, 200);
@ -916,7 +916,7 @@ static struct ast_config *config_mysql(const char *database, const char *table,
if ((result = mysql_store_result(&dbh->handle))) {
num_rows = mysql_num_rows(result);
ast_debug(1, "MySQL RealTime: Found %llu rows.\n", num_rows);
ast_debug(1, "MySQL RealTime: Found %" PRIu64 " rows.\n", num_rows);
/* There might exist a better way to access the column names other than counting,
* but I believe that would require another loop that we don't need. */