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 --- main/format.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'main/format.c') diff --git a/main/format.c b/main/format.c index 9c7b5919a..a41f26b4c 100644 --- a/main/format.c +++ b/main/format.c @@ -912,7 +912,7 @@ static char *show_codec_n(struct ast_cli_entry *e, int cmd, struct ast_cli_args } if (!found) { - ast_cli(a->fd, "Codec %d not found\n", format_id); + ast_cli(a->fd, "Codec %u not found\n", format_id); } f_list = ast_format_list_destroy(f_list); @@ -1163,7 +1163,7 @@ static int custom_celt_format(struct ast_format_list *entry, unsigned int maxbit return -1; } - snprintf(entry->desc, sizeof(entry->desc), "CELT Custom Format %dkhz", entry->samplespersecond/1000); + snprintf(entry->desc, sizeof(entry->desc), "CELT Custom Format %ukhz", entry->samplespersecond/1000); ast_format_append(&entry->format, CELT_ATTR_KEY_SAMP_RATE, entry->samplespersecond, @@ -1216,7 +1216,7 @@ static int custom_silk_format(struct ast_format_list *entry, unsigned int maxbit AST_FORMAT_ATTR_END); break; default: - ast_log(LOG_WARNING, "Custom SILK format definition '%s' can not support sample rate %d\n", entry->name, entry->samplespersecond); + ast_log(LOG_WARNING, "Custom SILK format definition '%s' can not support sample rate %u\n", entry->name, entry->samplespersecond); return -1; } ast_format_append(&entry->format, @@ -1385,7 +1385,7 @@ int ast_format_attr_reg_interface(const struct ast_format_attr_interface *interf /* check for duplicates first*/ if ((wrapper = ao2_find(interfaces, &tmp_wrapper, (OBJ_POINTER | OBJ_NOLOCK)))) { ao2_unlock(interfaces); - ast_log(LOG_WARNING, "Can not register attribute interface for format id %d, interface already exists.\n", interface->id); + ast_log(LOG_WARNING, "Can not register attribute interface for format id %u, interface already exists.\n", interface->id); ao2_ref(wrapper, -1); return -1; } -- cgit v1.2.3