[asterisk-commits] kmoore: branch 12 r413588 - in /branches/12: ./ apps/ apps/confbridge/ bridge...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri May 9 17:39:38 CDT 2014
Author: kmoore
Date: Fri May 9 17:39:22 2014
New Revision: 413588
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=413588
Log:
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
Modified:
branches/12/ (props changed)
branches/12/apps/app_adsiprog.c
branches/12/apps/app_confbridge.c
branches/12/apps/app_dial.c
branches/12/apps/app_dumpchan.c
branches/12/apps/app_festival.c
branches/12/apps/app_getcpeid.c
branches/12/apps/app_minivm.c
branches/12/apps/app_queue.c
branches/12/apps/app_sms.c
branches/12/apps/app_stack.c
branches/12/apps/app_verbose.c
branches/12/apps/app_voicemail.c
branches/12/apps/confbridge/conf_config_parser.c
branches/12/bridges/bridge_softmix.c
branches/12/cdr/cdr_adaptive_odbc.c
branches/12/cel/cel_odbc.c
branches/12/cel/cel_pgsql.c
branches/12/channels/chan_alsa.c
branches/12/channels/chan_dahdi.c
branches/12/channels/chan_gtalk.c
branches/12/channels/chan_iax2.c
branches/12/channels/chan_jingle.c
branches/12/channels/chan_mgcp.c
branches/12/channels/chan_motif.c
branches/12/channels/chan_phone.c
branches/12/channels/chan_sip.c
branches/12/channels/chan_skinny.c
branches/12/channels/chan_unistim.c
branches/12/channels/iax2/firmware.c
branches/12/channels/iax2/parser.c
branches/12/channels/pjsip/dialplan_functions.c
branches/12/channels/sig_analog.c
branches/12/channels/sig_pri.c
branches/12/channels/sip/config_parser.c
branches/12/channels/sip/include/sip.h
branches/12/formats/format_pcm.c
branches/12/funcs/func_channel.c
branches/12/funcs/func_env.c
branches/12/funcs/func_frame_trace.c
branches/12/funcs/func_hangupcause.c
branches/12/funcs/func_iconv.c
branches/12/funcs/func_srv.c
branches/12/funcs/func_sysinfo.c
branches/12/include/asterisk/astobj.h
branches/12/main/abstract_jb.c
branches/12/main/acl.c
branches/12/main/adsi.c
branches/12/main/aoc.c
branches/12/main/app.c
branches/12/main/asterisk.c
branches/12/main/audiohook.c
branches/12/main/bridge_channel.c
branches/12/main/bucket.c
branches/12/main/callerid.c
branches/12/main/ccss.c
branches/12/main/cdr.c
branches/12/main/channel.c
branches/12/main/cli.c
branches/12/main/config.c
branches/12/main/config_options.c
branches/12/main/core_unreal.c
branches/12/main/data.c
branches/12/main/devicestate.c
branches/12/main/dsp.c
branches/12/main/enum.c
branches/12/main/event.c
branches/12/main/file.c
branches/12/main/format.c
branches/12/main/frame.c
branches/12/main/io.c
branches/12/main/loader.c
branches/12/main/logger.c
branches/12/main/manager.c
branches/12/main/manager_bridges.c
branches/12/main/manager_channels.c
branches/12/main/netsock.c
branches/12/main/parking.c
branches/12/main/pbx.c
branches/12/main/rtp_engine.c
branches/12/main/sched.c
branches/12/main/security_events.c
branches/12/main/slinfactory.c
branches/12/main/stdtime/localtime.c
branches/12/main/stun.c
branches/12/main/taskprocessor.c
branches/12/main/translate.c
branches/12/main/udptl.c
branches/12/main/utils.c
branches/12/main/xmldoc.c
branches/12/pbx/dundi-parser.c
branches/12/pbx/pbx_config.c
branches/12/pbx/pbx_dundi.c
branches/12/res/ael/pval.c
branches/12/res/res_agi.c
branches/12/res/res_ari_model.c
branches/12/res/res_calendar.c
branches/12/res/res_calendar_caldav.c
branches/12/res/res_calendar_ews.c
branches/12/res/res_calendar_icalendar.c
branches/12/res/res_config_odbc.c
branches/12/res/res_corosync.c
branches/12/res/res_crypto.c
branches/12/res/res_fax.c
branches/12/res/res_fax_spandsp.c
branches/12/res/res_format_attr_celt.c
branches/12/res/res_format_attr_h263.c
branches/12/res/res_format_attr_h264.c
branches/12/res/res_format_attr_opus.c
branches/12/res/res_format_attr_silk.c
branches/12/res/res_http_websocket.c
branches/12/res/res_jabber.c
branches/12/res/res_monitor.c
branches/12/res/res_musiconhold.c
branches/12/res/res_odbc.c
branches/12/res/res_pjsip/location.c
branches/12/res/res_pjsip/pjsip_configuration.c
branches/12/res/res_pjsip_outbound_registration.c
branches/12/res/res_pjsip_pubsub.c
branches/12/res/res_pjsip_registrar.c
branches/12/res/res_pjsip_t38.c
branches/12/res/res_pktccops.c
branches/12/res/res_rtp_asterisk.c
branches/12/res/res_sorcery_config.c
branches/12/res/res_srtp.c
branches/12/res/res_stasis_playback.c
branches/12/res/res_stasis_recording.c
branches/12/res/res_stasis_snoop.c
branches/12/res/res_stun_monitor.c
branches/12/res/res_timing_dahdi.c
branches/12/res/res_xmpp.c
Propchange: branches/12/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Modified: branches/12/apps/app_adsiprog.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/apps/app_adsiprog.c?view=diff&rev=413588&r1=413587&r2=413588
==============================================================================
--- branches/12/apps/app_adsiprog.c (original)
+++ branches/12/apps/app_adsiprog.c Fri May 9 17:39:22 2014
@@ -211,7 +211,7 @@
if (!(argtype & ARG_NUMBER))
return -1;
/* Octal value */
- if (sscanf(src, "%30o", (int *)out) != 1)
+ if (sscanf(src, "%30o", (unsigned *)out) != 1)
return -1;
if (argtype & ARG_STRING) {
/* Convert */
Modified: branches/12/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/apps/app_confbridge.c?view=diff&rev=413588&r1=413587&r2=413588
==============================================================================
--- branches/12/apps/app_confbridge.c (original)
+++ branches/12/apps/app_confbridge.c Fri May 9 17:39:22 2014
@@ -2336,7 +2336,7 @@
ast_cli(a->fd, "================================ ====== ====== ========\n");
iter = ao2_iterator_init(conference_bridges, 0);
while ((conference = ao2_iterator_next(&iter))) {
- ast_cli(a->fd, "%-32s %6i %6i %s\n", conference->name, conference->activeusers + conference->waitingusers, conference->markedusers, (conference->locked ? "locked" : "unlocked"));
+ ast_cli(a->fd, "%-32s %6u %6u %s\n", conference->name, conference->activeusers + conference->waitingusers, conference->markedusers, (conference->locked ? "locked" : "unlocked"));
ao2_ref(conference, -1);
}
ao2_iterator_destroy(&iter);
@@ -2792,8 +2792,8 @@
"Event: ConfbridgeListRooms\r\n"
"%s"
"Conference: %s\r\n"
- "Parties: %d\r\n"
- "Marked: %d\r\n"
+ "Parties: %u\r\n"
+ "Marked: %u\r\n"
"Locked: %s\r\n"
"\r\n",
id_text,
Modified: branches/12/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/apps/app_dial.c?view=diff&rev=413588&r1=413587&r2=413588
==============================================================================
--- branches/12/apps/app_dial.c (original)
+++ branches/12/apps/app_dial.c Fri May 9 17:39:22 2014
@@ -1487,7 +1487,7 @@
/* Fall through */
case AST_FRAME_TEXT:
if (single && ast_write(in, f)) {
- ast_log(LOG_WARNING, "Unable to write frametype: %d\n",
+ ast_log(LOG_WARNING, "Unable to write frametype: %u\n",
f->frametype);
}
break;
@@ -1592,7 +1592,7 @@
case AST_FRAME_DTMF_BEGIN:
case AST_FRAME_DTMF_END:
if (ast_write(o->chan, f)) {
- ast_log(LOG_WARNING, "Unable to forward frametype: %d\n",
+ ast_log(LOG_WARNING, "Unable to forward frametype: %u\n",
f->frametype);
}
break;
Modified: branches/12/apps/app_dumpchan.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/apps/app_dumpchan.c?view=diff&rev=413588&r1=413587&r2=413588
==============================================================================
--- branches/12/apps/app_dumpchan.c (original)
+++ branches/12/apps/app_dumpchan.c Fri May 9 17:39:22 2014
@@ -105,7 +105,7 @@
"RDNIS= %s\n"
"Parkinglot= %s\n"
"Language= %s\n"
- "State= %s (%d)\n"
+ "State= %s (%u)\n"
"Rings= %d\n"
"NativeFormat= %s\n"
"WriteFormat= %s\n"
@@ -115,8 +115,8 @@
"WriteTranscode= %s %s\n"
"ReadTranscode= %s %s\n"
"1stFileDescriptor= %d\n"
- "Framesin= %d %s\n"
- "Framesout= %d %s\n"
+ "Framesin= %u %s\n"
+ "Framesout= %u %s\n"
"TimetoHangup= %ld\n"
"ElapsedTime= %dh%dm%ds\n"
"BridgeID= %s\n"
Modified: branches/12/apps/app_festival.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/apps/app_festival.c?view=diff&rev=413588&r1=413587&r2=413588
==============================================================================
--- branches/12/apps/app_festival.c (original)
+++ branches/12/apps/app_festival.c Fri May 9 17:39:22 2014
@@ -424,7 +424,7 @@
/* Convert to HEX and look if there is any matching file in the cache
directory */
for (i = 0; i < 16; i++) {
- snprintf(koko, sizeof(koko), "%X", MD5Res[i]);
+ snprintf(koko, sizeof(koko), "%X", (unsigned)MD5Res[i]);
strncat(MD5Hex, koko, sizeof(MD5Hex) - strlen(MD5Hex) - 1);
}
readcache = 0;
Modified: branches/12/apps/app_getcpeid.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/apps/app_getcpeid.c?view=diff&rev=413588&r1=413587&r2=413588
==============================================================================
--- branches/12/apps/app_getcpeid.c (original)
+++ branches/12/apps/app_getcpeid.c Fri May 9 17:39:22 2014
@@ -87,7 +87,9 @@
res = ast_adsi_get_cpeid(chan, cpeid, 0);
if (res > 0) {
gotcpeid = 1;
- ast_verb(3, "Got CPEID of '%02x:%02x:%02x:%02x' on '%s'\n", cpeid[0], cpeid[1], cpeid[2], cpeid[3], ast_channel_name(chan));
+ ast_verb(3, "Got CPEID of '%02x:%02x:%02x:%02x' on '%s'\n",
+ (unsigned)cpeid[0], (unsigned)cpeid[1], (unsigned)cpeid[2],
+ (unsigned)cpeid[3], ast_channel_name(chan));
}
if (res > -1) {
strcpy(data[1], "Measuring CPE...");
@@ -101,7 +103,9 @@
}
if (res > -1) {
if (gotcpeid)
- snprintf(data[1], 80, "CPEID: %02x:%02x:%02x:%02x", cpeid[0], cpeid[1], cpeid[2], cpeid[3]);
+ snprintf(data[1], 80, "CPEID: %02x:%02x:%02x:%02x",
+ (unsigned)cpeid[0], (unsigned)cpeid[1],
+ (unsigned)cpeid[2], (unsigned)cpeid[3]);
else
strcpy(data[1], "CPEID Unknown");
if (gotgeometry)
Modified: branches/12/apps/app_minivm.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/apps/app_minivm.c?view=diff&rev=413588&r1=413587&r2=413588
==============================================================================
--- branches/12/apps/app_minivm.c (original)
+++ branches/12/apps/app_minivm.c Fri May 9 17:39:22 2014
@@ -1406,7 +1406,7 @@
}
}
- fprintf(p, "Message-ID: <Asterisk-%d-%s-%d-%s>\n", (unsigned int)ast_random(), vmu->username, (int)getpid(), who);
+ fprintf(p, "Message-ID: <Asterisk-%u-%s-%d-%s>\n", (unsigned int)ast_random(), vmu->username, (int)getpid(), who);
if (ast_strlen_zero(vmu->email)) {
snprintf(email, sizeof(email), "%s@%s", vmu->username, vmu->domain);
@@ -1457,7 +1457,7 @@
fprintf(p, "MIME-Version: 1.0\n");
/* Something unique. */
- snprintf(bound, sizeof(bound), "voicemail_%s%d%d", vmu->username, (int)getpid(), (unsigned int)ast_random());
+ snprintf(bound, sizeof(bound), "voicemail_%s%d%u", vmu->username, (int)getpid(), (unsigned int)ast_random());
fprintf(p, "Content-Type: multipart/mixed; boundary=\"%s\"\n\n\n", bound);
Modified: branches/12/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/apps/app_queue.c?view=diff&rev=413588&r1=413587&r2=413588
==============================================================================
--- branches/12/apps/app_queue.c (original)
+++ branches/12/apps/app_queue.c Fri May 9 17:39:22 2014
@@ -2355,12 +2355,12 @@
ao2_iterator_destroy(&qiter);
if (found) {
- ast_debug(1, "Device '%s' changed to state '%d' (%s)\n",
+ ast_debug(1, "Device '%s' changed to state '%u' (%s)\n",
dev_state->device,
dev_state->state,
ast_devstate2str(dev_state->state));
} else {
- ast_debug(3, "Device '%s' changed to state '%d' (%s) but we don't care because they're not a member of any queue.\n",
+ ast_debug(3, "Device '%s' changed to state '%u' (%s) but we don't care because they're not a member of any queue.\n",
dev_state->device,
dev_state->state,
ast_devstate2str(dev_state->state));
@@ -6612,7 +6612,7 @@
ast_monitor_start(which, qe->parent->monfmt, ast_channel_uniqueid(qe->chan), 1, X_REC_IN | X_REC_OUT);
} else {
/* Last ditch effort -- no channel, make up something */
- snprintf(tmpid, sizeof(tmpid), "chan-%lx", ast_random());
+ snprintf(tmpid, sizeof(tmpid), "chan-%lx", (unsigned long)ast_random());
ast_monitor_start(which, qe->parent->monfmt, tmpid, 1, X_REC_IN | X_REC_OUT);
}
if (!ast_strlen_zero(monexec)) {
Modified: branches/12/apps/app_sms.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/apps/app_sms.c?view=diff&rev=413588&r1=413587&r2=413588
==============================================================================
--- branches/12/apps/app_sms.c (original)
+++ branches/12/apps/app_sms.c Fri May 9 17:39:22 2014
@@ -782,7 +782,7 @@
unsigned char n;
if (h->mr >= 0) {
- snprintf(mrs, sizeof(mrs), "%02X", h->mr);
+ snprintf(mrs, sizeof(mrs), "%02X", (unsigned)h->mr);
}
snprintf(line, sizeof(line), "%s %c%c%c%s %s %s %s ",
isodate(time(NULL), buf, sizeof(buf)),
@@ -999,7 +999,7 @@
snprintf(fn, sizeof(fn), "%s/sms/%s", ast_config_AST_SPOOL_DIR, h->smsc ? h->rx ? "morx" : "mttx" : h->rx ? "mtrx" : "motx");
ast_mkdir(fn, 0777); /* ensure it exists */
ast_copy_string(fn2, fn, sizeof(fn2));
- snprintf(fn2 + strlen(fn2), sizeof(fn2) - strlen(fn2), "/%s.%s-%d", h->queue, isodate(h->scts.tv_sec, buf, sizeof(buf)), seq++);
+ snprintf(fn2 + strlen(fn2), sizeof(fn2) - strlen(fn2), "/%s.%s-%u", h->queue, isodate(h->scts.tv_sec, buf, sizeof(buf)), seq++);
snprintf(fn + strlen(fn), sizeof(fn) - strlen(fn), "/.%s", fn2 + strlen(fn) + 1);
if ((o = fopen(fn, "w")) == NULL) {
return;
@@ -1015,7 +1015,7 @@
unsigned int p;
fprintf(o, "udh#");
for (p = 0; p < h->udhl; p++) {
- fprintf(o, "%02X", h->udh[p]);
+ fprintf(o, "%02X", (unsigned)h->udh[p]);
}
fprintf(o, "\n");
}
@@ -1048,13 +1048,13 @@
if (p == h->udl) { /* can write in ucs-1 hex */
fprintf(o, "ud#");
for (p = 0; p < h->udl; p++) {
- fprintf(o, "%02X", h->ud[p]);
+ fprintf(o, "%02X", (unsigned)h->ud[p]);
}
fprintf(o, "\n");
} else { /* write in UCS-2 */
fprintf(o, "ud##");
for (p = 0; p < h->udl; p++) {
- fprintf(o, "%04X", h->ud[p]);
+ fprintf(o, "%04X", (unsigned)h->ud[p]);
}
fprintf(o, "\n");
}
@@ -1071,7 +1071,7 @@
fprintf(o, "dcs=%d\n", h->dcs);
}
if (h->vp) {
- fprintf(o, "vp=%d\n", h->vp);
+ fprintf(o, "vp=%u\n", h->vp);
}
if (h->srr) {
fprintf(o, "srr=1\n");
@@ -1139,7 +1139,7 @@
return 0xFF; /* duh! */
}
} else {
- ast_log(LOG_WARNING, "Unknown message type %02X\n", h->imsg[2]);
+ ast_log(LOG_WARNING, "Unknown message type %02X\n", (unsigned)h->imsg[2]);
return 0xFF;
}
} else { /* client */
@@ -1162,7 +1162,7 @@
return 0xFF; /* duh! */
}
} else {
- ast_log(LOG_WARNING, "Unknown message type %02X\n", h->imsg[2]);
+ ast_log(LOG_WARNING, "Unknown message type %02X\n", (unsigned)h->imsg[2]);
return 0xFF;
}
}
@@ -1244,7 +1244,7 @@
int f;
for (p = s, f = 0; f < size && f < MAX_DEBUG_LEN; f++, p += 3) {
- sprintf(p, "%02X ", (unsigned char)buf[f]);
+ sprintf(p, "%02X ", (unsigned)buf[f]);
}
return(s);
}
@@ -1270,7 +1270,7 @@
msgsz += (h->imsg[f++] * 256);
switch (msg) {
case 0x13: /* Body */
- ast_verb(3, "SMS-P2 Body#%02X=[%.*s]\n", msg, msgsz, &h->imsg[f]);
+ ast_verb(3, "SMS-P2 Body#%02X=[%.*s]\n", (unsigned)msg, msgsz, &h->imsg[f]);
if (msgsz >= sizeof(h->ud)) {
msgsz = sizeof(h->ud) - 1;
}
@@ -1288,27 +1288,27 @@
tm.tm_min = ( (h->imsg[f + 6] * 10) + h->imsg[f + 7] );
tm.tm_sec = 0;
h->scts = ast_mktime(&tm, NULL);
- ast_verb(3, "SMS-P2 Date#%02X=%02d/%02d %02d:%02d\n", msg, tm.tm_mday, tm.tm_mon + 1, tm.tm_hour, tm.tm_min);
+ ast_verb(3, "SMS-P2 Date#%02X=%02d/%02d %02d:%02d\n", (unsigned)msg, tm.tm_mday, tm.tm_mon + 1, tm.tm_hour, tm.tm_min);
break;
case 0x15: /* Calling line (from SMSC) */
if (msgsz >= 20) {
msgsz = 20 - 1;
}
- ast_verb(3, "SMS-P2 Origin#%02X=[%.*s]\n", msg, msgsz, &h->imsg[f]);
+ ast_verb(3, "SMS-P2 Origin#%02X=[%.*s]\n", (unsigned)msg, msgsz, &h->imsg[f]);
ast_copy_string(h->oa, (char *)(&h->imsg[f]), msgsz + 1);
break;
case 0x18: /* Destination(from TE/phone) */
if (msgsz >= 20) {
msgsz = 20 - 1;
}
- ast_verb(3, "SMS-P2 Destination#%02X=[%.*s]\n", msg, msgsz, &h->imsg[f]);
+ ast_verb(3, "SMS-P2 Destination#%02X=[%.*s]\n", (unsigned)msg, msgsz, &h->imsg[f]);
ast_copy_string(h->da, (char *)(&h->imsg[f]), msgsz + 1);
break;
case 0x1C: /* Notify */
- ast_verb(3, "SMS-P2 Notify#%02X=%s\n", msg, sms_hexdump(&h->imsg[f], 3, debug_buf));
+ ast_verb(3, "SMS-P2 Notify#%02X=%s\n", (unsigned)msg, sms_hexdump(&h->imsg[f], 3, debug_buf));
break;
default:
- ast_verb(3, "SMS-P2 Par#%02X [%d]: %s\n", msg, msgsz, sms_hexdump(&h->imsg[f], msgsz, debug_buf));
+ ast_verb(3, "SMS-P2 Par#%02X [%d]: %s\n", (unsigned)msg, msgsz, sms_hexdump(&h->imsg[f], msgsz, debug_buf));
break;
}
f+=msgsz; /* Skip to next */
@@ -1482,7 +1482,7 @@
int n = (dir == DIR_RX) ? h->ibytep : msg[1] + 2;
int q = 0;
while (q < n && q < 30) {
- sprintf(p, " %02X", msg[q++]);
+ sprintf(p, " %02X", (unsigned)msg[q++]);
p += 3;
}
if (q < n) {
@@ -1892,7 +1892,7 @@
ast_app_parse_options(sms_options, &flags, sms_opts, sms_args.options);
}
- ast_verb(1, "sms argc %d queue <%s> opts <%s> addr <%s> body <%s>\n",
+ ast_verb(1, "sms argc %u queue <%s> opts <%s> addr <%s> body <%s>\n",
sms_args.argc, S_OR(sms_args.queue, ""),
S_OR(sms_args.options, ""),
S_OR(sms_args.addr, ""),
Modified: branches/12/apps/app_stack.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/apps/app_stack.c?view=diff&rev=413588&r1=413587&r2=413588
==============================================================================
--- branches/12/apps/app_stack.c (original)
+++ branches/12/apps/app_stack.c Fri May 9 17:39:22 2014
@@ -641,7 +641,7 @@
frame_set_var(chan, newframe, argname, i < args2.argc ? args2.argval[i] : "");
ast_debug(1, "Setting '%s' to '%s'\n", argname, i < args2.argc ? args2.argval[i] : "");
}
- snprintf(argname, sizeof(argname), "%d", args2.argc);
+ snprintf(argname, sizeof(argname), "%u", args2.argc);
frame_set_var(chan, newframe, "ARGC", argname);
/* And finally, save our return address */
Modified: branches/12/apps/app_verbose.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/apps/app_verbose.c?view=diff&rev=413588&r1=413587&r2=413588
==============================================================================
--- branches/12/apps/app_verbose.c (original)
+++ branches/12/apps/app_verbose.c Fri May 9 17:39:22 2014
@@ -78,7 +78,7 @@
static int verbose_exec(struct ast_channel *chan, const char *data)
{
- int vsize;
+ unsigned int vsize;
char *parse;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(level);
Modified: branches/12/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/apps/app_voicemail.c?view=diff&rev=413588&r1=413587&r2=413588
==============================================================================
--- branches/12/apps/app_voicemail.c (original)
+++ branches/12/apps/app_voicemail.c Fri May 9 17:39:22 2014
@@ -5071,7 +5071,7 @@
}
}
- 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 @@
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 @@
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 @@
* 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 @@
const char *val;
char *q, *stringp, *tmp;
int x;
- int tmpadsi[4];
+ unsigned int tmpadsi[4];
char secretfn[PATH_MAX] = "";
#ifdef IMAP_STORAGE
Modified: branches/12/apps/confbridge/conf_config_parser.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/apps/confbridge/conf_config_parser.c?view=diff&rev=413588&r1=413587&r2=413588
==============================================================================
--- branches/12/apps/confbridge/conf_config_parser.c (original)
+++ branches/12/apps/confbridge/conf_config_parser.c Fri May 9 17:39:22 2014
@@ -1057,7 +1057,7 @@
}
menu_action->data.dialplan_args.priority = 1; /* 1 by default */
if (!ast_strlen_zero(args.priority) &&
- (sscanf(args.priority, "%30u", &menu_action->data.dialplan_args.priority) != 1)) {
+ (sscanf(args.priority, "%30d", &menu_action->data.dialplan_args.priority) != 1)) {
/* invalid priority */
ast_free(menu_action);
return -1;
@@ -1324,9 +1324,9 @@
ast_cli(a->fd,"Drop_silence: %s\n",
u_profile.flags & USER_OPT_DROP_SILENCE ?
"enabled" : "disabled");
- ast_cli(a->fd,"Silence Threshold: %dms\n",
+ ast_cli(a->fd,"Silence Threshold: %ums\n",
u_profile.silence_threshold);
- ast_cli(a->fd,"Talking Threshold: %dms\n",
+ ast_cli(a->fd,"Talking Threshold: %ums\n",
u_profile.talking_threshold);
ast_cli(a->fd,"Denoise: %s\n",
u_profile.flags & USER_OPT_DENOISE ?
@@ -1449,14 +1449,14 @@
ast_cli(a->fd,"Language: %s\n", b_profile.language);
if (b_profile.internal_sample_rate) {
- snprintf(tmp, sizeof(tmp), "%d", b_profile.internal_sample_rate);
+ snprintf(tmp, sizeof(tmp), "%u", b_profile.internal_sample_rate);
} else {
ast_copy_string(tmp, "auto", sizeof(tmp));
}
ast_cli(a->fd,"Internal Sample Rate: %s\n", tmp);
if (b_profile.mix_interval) {
- ast_cli(a->fd,"Mixing Interval: %d\n", b_profile.mix_interval);
+ ast_cli(a->fd,"Mixing Interval: %u\n", b_profile.mix_interval);
} else {
ast_cli(a->fd,"Mixing Interval: Default 20ms\n");
}
@@ -1474,7 +1474,7 @@
b_profile.rec_file);
if (b_profile.max_members) {
- ast_cli(a->fd,"Max Members: %d\n", b_profile.max_members);
+ ast_cli(a->fd,"Max Members: %u\n", b_profile.max_members);
} else {
ast_cli(a->fd,"Max Members: No Limit\n");
}
Modified: branches/12/bridges/bridge_softmix.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/bridges/bridge_softmix.c?view=diff&rev=413588&r1=413587&r2=413588
==============================================================================
--- branches/12/bridges/bridge_softmix.c (original)
+++ branches/12/bridges/bridge_softmix.c Fri May 9 17:39:22 2014
@@ -665,7 +665,7 @@
ast_log(LOG_ERROR, "Synchronous bridge action written to a softmix bridge.\n");
ast_assert(0);
default:
- ast_debug(3, "Frame type %d unsupported\n", frame->frametype);
+ ast_debug(3, "Frame type %u unsupported\n", frame->frametype);
/* "Accept" the frame and discard it. */
break;
}
@@ -724,7 +724,7 @@
* from the current rate we are using. */
if (softmix_data->internal_rate != stats->locked_rate) {
softmix_data->internal_rate = stats->locked_rate;
- ast_debug(1, "Bridge is locked in at sample rate %d\n",
+ ast_debug(1, "Bridge is locked in at sample rate %u\n",
softmix_data->internal_rate);
return 1;
}
@@ -764,14 +764,14 @@
}
}
- ast_debug(1, "Bridge changed from %d To %d\n",
+ ast_debug(1, "Bridge changed from %u To %u\n",
softmix_data->internal_rate, best_rate);
softmix_data->internal_rate = best_rate;
return 1;
} else if (!stats->num_at_internal_rate && !stats->num_above_internal_rate) {
/* In this case, the highest supported rate is actually lower than the internal rate */
softmix_data->internal_rate = stats->highest_supported_rate;
- ast_debug(1, "Bridge changed from %d to %d\n",
+ ast_debug(1, "Bridge changed from %u to %u\n",
softmix_data->internal_rate, stats->highest_supported_rate);
return 1;
}
Modified: branches/12/cdr/cdr_adaptive_odbc.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/cdr/cdr_adaptive_odbc.c?view=diff&rev=413588&r1=413587&r2=413588
==============================================================================
--- branches/12/cdr/cdr_adaptive_odbc.c (original)
+++ branches/12/cdr/cdr_adaptive_odbc.c Fri May 9 17:39:22 2014
@@ -620,7 +620,7 @@
if (ast_strlen_zero(colptr)) {
continue;
} else {
- char integer = 0;
+ signed char integer = 0;
if (sscanf(colptr, "%30hhd", &integer) != 1) {
ast_log(LOG_WARNING, "CDR variable %s is not an integer.\n", entry->name);
continue;
@@ -635,7 +635,7 @@
if (ast_strlen_zero(colptr)) {
continue;
} else {
- char integer = 0;
+ signed char integer = 0;
if (sscanf(colptr, "%30hhd", &integer) != 1) {
ast_log(LOG_WARNING, "CDR variable %s is not an integer.\n", entry->name);
continue;
Modified: branches/12/cel/cel_odbc.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/cel/cel_odbc.c?view=diff&rev=413588&r1=413587&r2=413588
==============================================================================
--- branches/12/cel/cel_odbc.c (original)
+++ branches/12/cel/cel_odbc.c Fri May 9 17:39:22 2014
@@ -474,11 +474,11 @@
} else if (strcmp(entry->celname, "peer") == 0) {
ast_copy_string(colbuf, record.peer, sizeof(colbuf));
} else if (strcmp(entry->celname, "amaflags") == 0) {
- snprintf(colbuf, sizeof(colbuf), "%d", record.amaflag);
+ snprintf(colbuf, sizeof(colbuf), "%u", record.amaflag);
} else if (strcmp(entry->celname, "extra") == 0) {
ast_copy_string(colbuf, record.extra, sizeof(colbuf));
} else if (strcmp(entry->celname, "eventtype") == 0) {
- snprintf(colbuf, sizeof(colbuf), "%d", record.event_type);
+ snprintf(colbuf, sizeof(colbuf), "%u", record.event_type);
} else {
colbuf[0] = 0;
unknown = 1;
@@ -692,7 +692,7 @@
break;
case SQL_TINYINT:
{
- char integer = 0;
+ signed char integer = 0;
if (sscanf(colptr, "%30hhd", &integer) != 1) {
ast_log(LOG_WARNING, "CEL variable %s is not an integer.\n", entry->name);
continue;
@@ -705,7 +705,7 @@
break;
case SQL_BIT:
{
- char integer = 0;
+ signed char integer = 0;
if (sscanf(colptr, "%30hhd", &integer) != 1) {
ast_log(LOG_WARNING, "CEL variable %s is not an integer.\n", entry->name);
continue;
Modified: branches/12/cel/cel_pgsql.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/cel/cel_pgsql.c?view=diff&rev=413588&r1=413587&r2=413588
==============================================================================
--- branches/12/cel/cel_pgsql.c (original)
+++ branches/12/cel/cel_pgsql.c Fri May 9 17:39:22 2014
@@ -204,11 +204,11 @@
if (strncmp(cur->type, "int", 3) == 0) {
/* Integer, no need to escape anything */
LENGTHEN_BUF2(13);
- ast_str_append(&sql2, 0, "%s%d", SEP, record.amaflag);
+ ast_str_append(&sql2, 0, "%s%u", SEP, record.amaflag);
} else {
/* Although this is a char field, there are no special characters in the values for these fields */
LENGTHEN_BUF2(31);
- ast_str_append(&sql2, 0, "%s'%d'", SEP, record.amaflag);
+ ast_str_append(&sql2, 0, "%s'%u'", SEP, record.amaflag);
}
} else {
/* Arbitrary field, could be anything */
Modified: branches/12/channels/chan_alsa.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/channels/chan_alsa.c?view=diff&rev=413588&r1=413587&r2=413588
==============================================================================
--- branches/12/channels/chan_alsa.c (original)
+++ branches/12/channels/chan_alsa.c Fri May 9 17:39:22 2014
@@ -207,12 +207,12 @@
direction = 0;
err = snd_pcm_hw_params_set_rate_near(handle, hwparams, &rate, &direction);
if (rate != DESIRED_RATE)
- ast_log(LOG_WARNING, "Rate not correct, requested %d, got %d\n", DESIRED_RATE, rate);
+ ast_log(LOG_WARNING, "Rate not correct, requested %d, got %u\n", DESIRED_RATE, rate);
direction = 0;
err = snd_pcm_hw_params_set_period_size_near(handle, hwparams, &period_size, &direction);
if (err < 0)
- ast_log(LOG_ERROR, "period_size(%ld frames) is bad: %s\n", period_size, snd_strerror(err));
+ ast_log(LOG_ERROR, "period_size(%lu frames) is bad: %s\n", period_size, snd_strerror(err));
else {
ast_debug(1, "Period size is %d\n", err);
}
@@ -220,7 +220,7 @@
buffer_size = 4096 * 2; /* period_size * 16; */
err = snd_pcm_hw_params_set_buffer_size_near(handle, hwparams, &buffer_size);
if (err < 0)
- ast_log(LOG_WARNING, "Problem setting buffer size of %ld: %s\n", buffer_size, snd_strerror(err));
+ ast_log(LOG_WARNING, "Problem setting buffer size of %lu: %s\n", buffer_size, snd_strerror(err));
else {
ast_debug(1, "Buffer size is set to %d frames\n", err);
}
Modified: branches/12/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/channels/chan_dahdi.c?view=diff&rev=413588&r1=413587&r2=413588
==============================================================================
--- branches/12/channels/chan_dahdi.c (original)
+++ branches/12/channels/chan_dahdi.c Fri May 9 17:39:22 2014
@@ -1545,7 +1545,7 @@
ast_debug(1, "%s DTMF digit: 0x%02X '%c' on %s\n",
f->frametype == AST_FRAME_DTMF_BEGIN ? "Begin" : "End",
- f->subclass.integer, f->subclass.integer, ast_channel_name(ast));
+ (unsigned)f->subclass.integer, f->subclass.integer, ast_channel_name(ast));
if (f->subclass.integer == 'f') {
if (f->frametype == AST_FRAME_DTMF_END) {
@@ -1644,7 +1644,7 @@
return ast_manager_event_blob_create(EVENT_FLAG_CALL, "DAHDIChannel",
"%s"
- "DAHDISpan: %d\r\n"
+ "DAHDISpan: %u\r\n"
"DAHDIChannel: %s\r\n",
ast_str_buffer(channel_string),
(unsigned int)ast_json_integer_get(span),
@@ -2549,7 +2549,7 @@
}
if (sub != ANALOG_SUB_REAL) {
- ast_log(LOG_ERROR, "Trying to dial_digits '%s' on channel %d subchannel %d\n",
+ ast_log(LOG_ERROR, "Trying to dial_digits '%s' on channel %d subchannel %u\n",
dop->dialstr, p->channel, sub);
return -1;
}
@@ -6978,7 +6978,7 @@
ast_debug(1, "%s DTMF digit: 0x%02X '%c' on %s\n",
f->frametype == AST_FRAME_DTMF_BEGIN ? "Begin" : "End",
- f->subclass.integer, f->subclass.integer, ast_channel_name(ast));
+ (unsigned)f->subclass.integer, f->subclass.integer, ast_channel_name(ast));
if (p->confirmanswer) {
if (f->frametype == AST_FRAME_DTMF_END) {
@@ -7420,7 +7420,7 @@
return NULL;
}
mssinceflash = ast_tvdiff_ms(ast_tvnow(), p->flashtime);
- ast_debug(1, "Last flash was %d ms ago\n", mssinceflash);
+ ast_debug(1, "Last flash was %u ms ago\n", mssinceflash);
if (mssinceflash < MIN_MS_SINCE_FLASH) {
/* It hasn't been long enough since the last flashook. This is probably a bounce on
hanging up. Hangup both channels now */
@@ -7583,7 +7583,7 @@
res = tone_zone_play_tone(p->subs[SUB_REAL].dfd, DAHDI_TONE_DIALTONE);
break;
default:
- ast_log(LOG_WARNING, "FXO phone off hook in weird state %d??\n", ast_channel_state(ast));
+ ast_log(LOG_WARNING, "FXO phone off hook in weird state %u??\n", ast_channel_state(ast));
}
break;
case SIG_FXSLS:
@@ -7633,7 +7633,7 @@
ast_setstate(ast, AST_STATE_UP);
}
} else if (ast_channel_state(ast) != AST_STATE_RING)
- ast_log(LOG_WARNING, "Ring/Off-hook in strange state %d on channel %d\n", ast_channel_state(ast), p->channel);
+ ast_log(LOG_WARNING, "Ring/Off-hook in strange state %u on channel %d\n", ast_channel_state(ast), p->channel);
break;
default:
ast_log(LOG_WARNING, "Don't know how to handle ring/off hook for signalling %d\n", p->sig);
@@ -7877,7 +7877,7 @@
if (p->dialing)
ast_debug(1, "Ignoring wink on channel %d\n", p->channel);
else
- ast_debug(1, "Got wink in weird state %d on channel %d\n", ast_channel_state(ast), p->channel);
+ ast_debug(1, "Got wink in weird state %u on channel %d\n", ast_channel_state(ast), p->channel);
break;
case SIG_FEATDMF_TA:
switch (p->whichwink) {
@@ -7980,7 +7980,7 @@
p->polaritydelaytv = ast_tvnow();
}
} else
- ast_debug(1, "Ignore switch to REVERSED Polarity on channel %d, state %d\n", p->channel, ast_channel_state(ast));
+ ast_debug(1, "Ignore switch to REVERSED Polarity on channel %d, state %u\n", p->channel, ast_channel_state(ast));
}
/* Removed else statement from here as it was preventing hangups from ever happening*/
/* Added AST_STATE_RING in if statement below to deal with calling party hangups that take place when ringing */
@@ -7989,21 +7989,21 @@
(p->polarity == POLARITY_REV) &&
((ast_channel_state(ast) == AST_STATE_UP) || (ast_channel_state(ast) == AST_STATE_RING)) ) {
/* Added log_debug information below to provide a better indication of what is going on */
- ast_debug(1, "Polarity Reversal event occured - DEBUG 1: channel %d, state %d, pol= %d, aonp= %d, honp= %d, pdelay= %d, tv= %" PRIi64 "\n", p->channel, ast_channel_state(ast), p->polarity, p->answeronpolarityswitch, p->hanguponpolarityswitch, p->polarityonanswerdelay, ast_tvdiff_ms(ast_tvnow(), p->polaritydelaytv) );
+ ast_debug(1, "Polarity Reversal event occured - DEBUG 1: channel %d, state %u, pol= %d, aonp= %d, honp= %d, pdelay= %d, tv= %" PRIi64 "\n", p->channel, ast_channel_state(ast), p->polarity, p->answeronpolarityswitch, p->hanguponpolarityswitch, p->polarityonanswerdelay, ast_tvdiff_ms(ast_tvnow(), p->polaritydelaytv) );
if (ast_tvdiff_ms(ast_tvnow(), p->polaritydelaytv) > p->polarityonanswerdelay) {
ast_debug(1, "Polarity Reversal detected and now Hanging up on channel %d\n", p->channel);
ast_softhangup(p->owner, AST_SOFTHANGUP_EXPLICIT);
p->polarity = POLARITY_IDLE;
} else
- ast_debug(1, "Polarity Reversal detected but NOT hanging up (too close to answer event) on channel %d, state %d\n", p->channel, ast_channel_state(ast));
+ ast_debug(1, "Polarity Reversal detected but NOT hanging up (too close to answer event) on channel %d, state %u\n", p->channel, ast_channel_state(ast));
} else {
p->polarity = POLARITY_IDLE;
- ast_debug(1, "Ignoring Polarity switch to IDLE on channel %d, state %d\n", p->channel, ast_channel_state(ast));
+ ast_debug(1, "Ignoring Polarity switch to IDLE on channel %d, state %u\n", p->channel, ast_channel_state(ast));
}
/* Added more log_debug information below to provide a better indication of what is going on */
- ast_debug(1, "Polarity Reversal event occured - DEBUG 2: channel %d, state %d, pol= %d, aonp= %d, honp= %d, pdelay= %d, tv= %" PRIi64 "\n", p->channel, ast_channel_state(ast), p->polarity, p->answeronpolarityswitch, p->hanguponpolarityswitch, p->polarityonanswerdelay, ast_tvdiff_ms(ast_tvnow(), p->polaritydelaytv) );
+ ast_debug(1, "Polarity Reversal event occured - DEBUG 2: channel %d, state %u, pol= %d, aonp= %d, honp= %d, pdelay= %d, tv= %" PRIi64 "\n", p->channel, ast_channel_state(ast), p->polarity, p->answeronpolarityswitch, p->hanguponpolarityswitch, p->polarityonanswerdelay, ast_tvdiff_ms(ast_tvnow(), p->polaritydelaytv) );
break;
default:
ast_debug(1, "Dunno what to do with event %d on channel %d\n", res, p->channel);
@@ -8523,7 +8523,7 @@
/* Don't accept in-band DTMF when in overlap dial mode */
ast_debug(1, "Absorbing inband %s DTMF digit: 0x%02X '%c' on %s\n",
f->frametype == AST_FRAME_DTMF_BEGIN ? "begin" : "end",
- f->subclass.integer, f->subclass.integer, ast_channel_name(ast));
+ (unsigned)f->subclass.integer, f->subclass.integer, ast_channel_name(ast));
f->frametype = AST_FRAME_NULL;
f->subclass.integer = 0;
@@ -8634,7 +8634,7 @@
/* Write a frame of (presumably voice) data */
if (frame->frametype != AST_FRAME_VOICE) {
if (frame->frametype != AST_FRAME_IMAGE)
- ast_log(LOG_WARNING, "Don't know what to do with frame type '%d'\n", frame->frametype);
+ ast_log(LOG_WARNING, "Don't know what to do with frame type '%u'\n", frame->frametype);
return 0;
}
if ((frame->subclass.format.id != AST_FORMAT_SLINEAR) &&
@@ -8826,15 +8826,15 @@
ast_mutex_lock(&i->pri->lock);
y = ++i->pri->new_chan_seq;
if (is_outgoing) {
- ast_str_set(&chan_name, 0, "i%d/%s-%x", i->pri->span, address, y);
+ ast_str_set(&chan_name, 0, "i%d/%s-%x", i->pri->span, address, (unsigned)y);
address[0] = '\0';
} else if (ast_strlen_zero(i->cid_subaddr)) {
/* Put in caller-id number only since there is no subaddress. */
- ast_str_set(&chan_name, 0, "i%d/%s-%x", i->pri->span, i->cid_num, y);
+ ast_str_set(&chan_name, 0, "i%d/%s-%x", i->pri->span, i->cid_num, (unsigned)y);
} else {
/* Put in caller-id number and subaddress. */
ast_str_set(&chan_name, 0, "i%d/%s:%s-%x", i->pri->span, i->cid_num,
- i->cid_subaddr, y);
+ i->cid_subaddr, (unsigned)y);
}
ast_mutex_unlock(&i->pri->lock);
#endif /* defined(HAVE_PRI) */
@@ -15089,9 +15089,9 @@
ast_cli(a->fd, "Echo Cancellation:\n");
if (tmp->echocancel.head.tap_length) {
- ast_cli(a->fd, "\t%d taps\n", tmp->echocancel.head.tap_length);
+ ast_cli(a->fd, "\t%u taps\n", tmp->echocancel.head.tap_length);
for (x = 0; x < tmp->echocancel.head.param_count; x++) {
- ast_cli(a->fd, "\t\t%s: %ud\n", tmp->echocancel.params[x].name, tmp->echocancel.params[x].value);
+ ast_cli(a->fd, "\t\t%s: %dd\n", tmp->echocancel.params[x].name, tmp->echocancel.params[x].value);
}
[... 5772 lines stripped ...]
More information about the asterisk-commits
mailing list