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.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@413586 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kinsey Moore
2014-05-09 22:18:59 +00:00
parent cb8877e720
commit 3e9a54d857
95 changed files with 553 additions and 542 deletions

View File

@@ -1340,7 +1340,7 @@ static enum AST_LOCK_RESULT ast_lock_path_lockfile(const char *path)
s = ast_alloca(lp + 10);
fs = ast_alloca(lp + 20);
snprintf(fs, strlen(path) + 19, "%s/.lock-%08lx", path, ast_random());
snprintf(fs, strlen(path) + 19, "%s/.lock-%08lx", path, (unsigned long)ast_random());
fd = open(fs, O_WRONLY | O_CREAT | O_EXCL, AST_FILE_MODE);
if (fd < 0) {
ast_log(LOG_ERROR, "Unable to create lock file '%s': %s\n", path, strerror(errno));
@@ -1718,7 +1718,7 @@ static int ivr_dispatch(struct ast_channel *chan, struct ast_ivr_option *option,
ast_stopstream(chan);
return res;
default:
ast_log(LOG_NOTICE, "Unknown dispatch function %d, ignoring!\n", option->action);
ast_log(LOG_NOTICE, "Unknown dispatch function %u, ignoring!\n", option->action);
return 0;
}
return -1;