mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
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
This commit is contained in:
@@ -754,15 +754,15 @@ static void sig_pri_set_subaddress(struct ast_party_subaddress *ast_subaddress,
|
||||
ptr = cnum;
|
||||
len = pri_subaddress->length - 1; /* -1 account for zero based indexing */
|
||||
for (x = 0; x < len; ++x) {
|
||||
ptr += sprintf(ptr, "%02x", pri_subaddress->data[x]);
|
||||
ptr += sprintf(ptr, "%02x", (unsigned)pri_subaddress->data[x]);
|
||||
}
|
||||
|
||||
if (pri_subaddress->odd_even_indicator) {
|
||||
/* ODD */
|
||||
sprintf(ptr, "%01x", (pri_subaddress->data[len]) >> 4);
|
||||
sprintf(ptr, "%01x", (unsigned)((pri_subaddress->data[len]) >> 4));
|
||||
} else {
|
||||
/* EVEN */
|
||||
sprintf(ptr, "%02x", pri_subaddress->data[len]);
|
||||
sprintf(ptr, "%02x", (unsigned)pri_subaddress->data[len]);
|
||||
}
|
||||
ast_subaddress->str = cnum;
|
||||
}
|
||||
@@ -2427,8 +2427,8 @@ static void party_json_to_ami(struct ast_str **msg, const char *prefix, struct a
|
||||
struct ast_json *subaddress = ast_json_object_get(party, "subaddress");
|
||||
|
||||
/* Combined party presentation */
|
||||
ast_str_append(msg, 0, "%sPres: %d (%s)\r\n", prefix,
|
||||
(uint32_t)ast_json_integer_get(presentation),
|
||||
ast_str_append(msg, 0, "%sPres: %zd (%s)\r\n", prefix,
|
||||
ast_json_integer_get(presentation),
|
||||
ast_json_string_get(presentation_txt));
|
||||
|
||||
/* Party number */
|
||||
@@ -5328,7 +5328,7 @@ static void sig_pri_moh_fsm_event(struct ast_channel *chan, struct sig_pri_chan
|
||||
if (orig_state < SIG_PRI_MOH_STATE_IDLE || SIG_PRI_MOH_STATE_NUM <= orig_state
|
||||
|| !sig_pri_moh_fsm[orig_state]) {
|
||||
/* Programming error: State not implemented. */
|
||||
ast_log(LOG_ERROR, "MOH state not implemented: %s(%d)\n",
|
||||
ast_log(LOG_ERROR, "MOH state not implemented: %s(%u)\n",
|
||||
sig_pri_moh_state_str(orig_state), orig_state);
|
||||
return;
|
||||
}
|
||||
@@ -8041,7 +8041,7 @@ int sig_pri_call(struct sig_pri_chan *p, struct ast_channel *ast, const char *rd
|
||||
if (p->pri->facilityenable)
|
||||
pri_facility_enable(p->pri->pri);
|
||||
|
||||
ast_verb(3, "Requested transfer capability: 0x%.2x - %s\n", ast_channel_transfercapability(ast), ast_transfercapability2str(ast_channel_transfercapability(ast)));
|
||||
ast_verb(3, "Requested transfer capability: 0x%.2x - %s\n", (unsigned)ast_channel_transfercapability(ast), ast_transfercapability2str(ast_channel_transfercapability(ast)));
|
||||
dp_strip = 0;
|
||||
pridialplan = p->pri->dialplan - 1;
|
||||
if (pridialplan == -2 || pridialplan == -3) { /* compute dynamically */
|
||||
@@ -8801,7 +8801,7 @@ int sig_pri_digit_begin(struct sig_pri_chan *pvt, struct ast_channel *ast, char
|
||||
}
|
||||
if (pvt->call_level < SIG_PRI_CALL_LEVEL_CONNECT) {
|
||||
ast_log(LOG_WARNING,
|
||||
"Span %d: Digit '%c' may be ignored by peer. (Call level:%d(%s))\n",
|
||||
"Span %d: Digit '%c' may be ignored by peer. (Call level:%u(%s))\n",
|
||||
pvt->pri->span, digit, pvt->call_level,
|
||||
sig_pri_call_level2str(pvt->call_level));
|
||||
}
|
||||
|
Reference in New Issue
Block a user