From abd3e4040bd76058d0148884879858894258fb9f Mon Sep 17 00:00:00 2001 From: Kinsey Moore Date: Fri, 9 May 2014 22:49:26 +0000 Subject: 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 --- res/res_config_odbc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'res/res_config_odbc.c') 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); -- cgit v1.2.3