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
This commit is contained in:
Kinsey Moore
2014-05-09 22:49:26 +00:00
parent f3b55da1b8
commit abd3e4040b
138 changed files with 726 additions and 717 deletions

View File

@@ -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);