From 13b87f413fdf80c6ee92e9fc801866dd6c8b1db4 Mon Sep 17 00:00:00 2001 From: tilghman Date: Sun, 10 Jan 2010 19:37:30 +0000 Subject: According to POSIX, the capital L modifier applies only to floating point types. Fixes a crash on Solaris. (closes issue #16572) Reported by: crjw Patches: frame_changes.patch uploaded by crjw (license 963) Plus several others found and fixed by me git-svn-id: http://svn.digium.com/svn/asterisk/trunk@239074 f38db490-d61c-443f-a65b-d21fe96a405b --- addons/chan_ooh323.c | 2 +- channels/chan_iax2.c | 2 +- main/frame.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/addons/chan_ooh323.c b/addons/chan_ooh323.c index 4c633ed3a..1d012a9eb 100644 --- a/addons/chan_ooh323.c +++ b/addons/chan_ooh323.c @@ -558,7 +558,7 @@ static struct ast_channel *ooh323_request(const char *type, format_t format, oldformat = format; format &= AST_FORMAT_AUDIO_MASK; if (!format) { - ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format '%Ld'\n", (long long) format); + ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format '%lld'\n", (long long) format); return NULL; } diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 76abb11a7..94edc3e6d 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -1517,7 +1517,7 @@ static unsigned char compress_subclass(format_t subclass) for (x = 0; x < IAX_MAX_SHIFT; x++) { if (subclass & (1LL << x)) { if (power > -1) { - ast_log(LOG_WARNING, "Can't compress subclass %Ld\n", (long long) subclass); + ast_log(LOG_WARNING, "Can't compress subclass %lld\n", (long long) subclass); return 0; } else power = x; diff --git a/main/frame.c b/main/frame.c index fb4b4a478..1f1476c7c 100644 --- a/main/frame.c +++ b/main/frame.c @@ -703,8 +703,8 @@ static char *show_codecs(struct ast_cli_entry *e, int cmd, struct ast_cli_args * } } - snprintf(hex, sizeof(hex), "(0x%Lx)", 1LL << i); - ast_cli(a->fd, "%19Lu (1 << %2d) %20s %5s %8s (%s)\n", 1LL << i, i, hex, + snprintf(hex, sizeof(hex), "(0x%llx)", 1LL << i); + ast_cli(a->fd, "%19llu (1 << %2d) %20s %5s %8s (%s)\n", 1LL << i, i, hex, ((1LL << i) & AST_FORMAT_AUDIO_MASK) ? "audio" : i == 16 || i == 17 ? "image" : ((1LL << i) & AST_FORMAT_VIDEO_MASK) ? "video" : @@ -741,7 +741,7 @@ static char *show_codec_n(struct ast_cli_entry *e, int cmd, struct ast_cli_args if (a->argc != 4) return CLI_SHOWUSAGE; - if (sscanf(a->argv[3], "%30Ld", &type_punned_codec) != 1) { + if (sscanf(a->argv[3], "%30lld", &type_punned_codec) != 1) { return CLI_SHOWUSAGE; } codec = type_punned_codec; @@ -749,11 +749,11 @@ static char *show_codec_n(struct ast_cli_entry *e, int cmd, struct ast_cli_args for (i = 0; i < 63; i++) if (codec & (1LL << i)) { found = 1; - ast_cli(a->fd, "%11Lu (1 << %2d) %s\n", 1LL << i, i, ast_codec2str(1LL << i)); + ast_cli(a->fd, "%11llu (1 << %2d) %s\n", 1LL << i, i, ast_codec2str(1LL << i)); } if (!found) - ast_cli(a->fd, "Codec %Ld not found\n", (long long) codec); + ast_cli(a->fd, "Codec %lld not found\n", (long long) codec); return CLI_SUCCESS; } -- cgit v1.2.3