summaryrefslogtreecommitdiff
path: root/res/res_config_odbc.c
diff options
context:
space:
mode:
authorKinsey Moore <kmoore@digium.com>2014-05-09 22:49:26 +0000
committerKinsey Moore <kmoore@digium.com>2014-05-09 22:49:26 +0000
commitabd3e4040bd76058d0148884879858894258fb9f (patch)
treec5695a0880c4928731b1aa864f862c6cffa57428 /res/res_config_odbc.c
parentf3b55da1b855b12a59f84fd9bf6768eb101cd910 (diff)
Allow Asterisk to compile under GCC 4.10
This resolves a large number of compiler warnings from GCC 4.10 which cause the build to fail under dev mode. The vast majority are signed/unsigned mismatches in printf-style format strings. ........ Merged revisions 413586 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 413587 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 413588 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_config_odbc.c')
-rw-r--r--res/res_config_odbc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/res/res_config_odbc.c b/res/res_config_odbc.c
index 585c75147..291c33590 100644
--- a/res/res_config_odbc.c
+++ b/res/res_config_odbc.c
@@ -83,7 +83,7 @@ static void decode_chunk(char *chunk)
{
for (; *chunk; chunk++) {
if (*chunk == '^' && strchr("0123456789ABCDEF", chunk[1]) && strchr("0123456789ABCDEF", chunk[2])) {
- sscanf(chunk + 1, "%02hhX", chunk);
+ sscanf(chunk + 1, "%02hhX", (unsigned char *)chunk);
memmove(chunk + 1, chunk + 3, strlen(chunk + 3) + 1);
}
}
@@ -109,7 +109,7 @@ static SQLHSTMT custom_prepare(struct odbc_obj *obj, void *data)
return NULL;
}
- ast_debug(1, "Skip: %lld; SQL: %s\n", cps->skip, cps->sql);
+ ast_debug(1, "Skip: %llu; SQL: %s\n", cps->skip, cps->sql);
res = SQLPrepare(stmt, (unsigned char *)cps->sql, SQL_NTS);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
@@ -122,7 +122,7 @@ static SQLHSTMT custom_prepare(struct odbc_obj *obj, void *data)
const char *newval = field->value;
if ((1LL << count++) & cps->skip) {
- ast_debug(1, "Skipping field '%s'='%s' (%llo/%llo)\n", field->name, newval, 1LL << (count - 1), cps->skip);
+ ast_debug(1, "Skipping field '%s'='%s' (%llo/%llo)\n", field->name, newval, 1ULL << (count - 1), cps->skip);
continue;
}
ast_debug(1, "Parameter %d ('%s') = '%s'\n", x, field->name, newval);