summaryrefslogtreecommitdiff
path: root/main/app.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 /main/app.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 'main/app.c')
-rw-r--r--main/app.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/app.c b/main/app.c
index a02c6d671..a5c4c7af5 100644
--- a/main/app.c
+++ b/main/app.c
@@ -773,7 +773,7 @@ static void linear_release(struct ast_channel *chan, void *params)
struct linear_state *ls = params;
if (ls->origwfmt.id && ast_set_write_format(chan, &ls->origwfmt)) {
- ast_log(LOG_WARNING, "Unable to restore channel '%s' to format '%d'\n", ast_channel_name(chan), ls->origwfmt.id);
+ ast_log(LOG_WARNING, "Unable to restore channel '%s' to format '%u'\n", ast_channel_name(chan), ls->origwfmt.id);
}
if (ls->autoclose) {
@@ -1254,7 +1254,7 @@ static struct ast_frame *make_silence(const struct ast_frame *orig)
samples += orig->samples;
}
- ast_verb(4, "Silencing %zd samples\n", samples);
+ ast_verb(4, "Silencing %zu samples\n", samples);
datalen = sizeof(short) * samples;
@@ -2004,7 +2004,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));
@@ -2382,7 +2382,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;