diff options
author | Kinsey Moore <kmoore@digium.com> | 2014-05-09 22:49:26 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2014-05-09 22:49:26 +0000 |
commit | abd3e4040bd76058d0148884879858894258fb9f (patch) | |
tree | c5695a0880c4928731b1aa864f862c6cffa57428 /apps/app_voicemail.c | |
parent | f3b55da1b855b12a59f84fd9bf6768eb101cd910 (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 'apps/app_voicemail.c')
-rw-r--r-- | apps/app_voicemail.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 7db2a2564..cb85c5be9 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -5071,7 +5071,7 @@ static void make_email_file(FILE *p, } } - fprintf(p, "Message-ID: <Asterisk-%d-%d-%s-%d@%s>" ENDL, msgnum + 1, + fprintf(p, "Message-ID: <Asterisk-%d-%u-%s-%d@%s>" ENDL, msgnum + 1, (unsigned int) ast_random(), mailbox, (int) getpid(), host); if (imap) { /* additional information needed for IMAP searching */ @@ -5110,7 +5110,7 @@ static void make_email_file(FILE *p, fprintf(p, "MIME-Version: 1.0" ENDL); if (attach_user_voicemail) { /* Something unique. */ - snprintf(bound, sizeof(bound), "----voicemail_%d%s%d%d", msgnum + 1, mailbox, + snprintf(bound, sizeof(bound), "----voicemail_%d%s%d%u", msgnum + 1, mailbox, (int) getpid(), (unsigned int) ast_random()); fprintf(p, "Content-Type: multipart/mixed; boundary=\"%s\"" ENDL, bound); @@ -5301,7 +5301,7 @@ static int sendmail(char *srcemail, if (!strcmp(format, "wav49")) format = "WAV"; - ast_debug(3, "Attaching file '%s', format '%s', uservm is '%d', global is %d\n", attach, format, attach_user_voicemail, ast_test_flag((&globalflags), VM_ATTACH)); + ast_debug(3, "Attaching file '%s', format '%s', uservm is '%d', global is %u\n", attach, format, attach_user_voicemail, ast_test_flag((&globalflags), VM_ATTACH)); /* Make a temporary file instead of piping directly to sendmail, in case the mail command hangs */ if ((p = vm_mkftemp(tmp)) == NULL) { @@ -6033,7 +6033,7 @@ static void generate_msg_id(char *dst) * called each time a new msg_id is generated. This should achieve uniqueness, * but only in single system solutions. */ - int unique_counter = ast_atomic_fetchadd_int(&msg_id_incrementor, +1); + unsigned int unique_counter = ast_atomic_fetchadd_int(&msg_id_incrementor, +1); snprintf(dst, MSG_ID_LEN, "%ld-%08x", (long) time(NULL), unique_counter); } @@ -12997,7 +12997,7 @@ static int actual_load_config(int reload, struct ast_config *cfg, struct ast_con const char *val; char *q, *stringp, *tmp; int x; - int tmpadsi[4]; + unsigned int tmpadsi[4]; char secretfn[PATH_MAX] = ""; #ifdef IMAP_STORAGE |