[asterisk-commits] build: A few gcc 7 error fixes (asterisk[13])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Sep 25 12:29:15 CDT 2017
Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/6583 )
Change subject: build: A few gcc 7 error fixes
......................................................................
build: A few gcc 7 error fixes
Change-Id: I7b5300fbf1af7d88d47129db13ad6dbdc9b553ec
---
M apps/app_meetme.c
M channels/chan_dahdi.c
M channels/sig_pri.c
M channels/sig_pri.h
4 files changed, 21 insertions(+), 17 deletions(-)
Approvals:
Matthew Fredrickson: Looks good to me, but someone else must approve
Richard Mudgett: Looks good to me, approved
Joshua Colp: Approved for Submit
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index 2ad1920..2cf252d 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -2254,20 +2254,23 @@
if (trunk_ref->ring_timeout) {
snprintf(ring_timeout, sizeof(ring_timeout),
"%u", trunk_ref->ring_timeout);
- } else
+ } else {
strcpy(ring_timeout, "(none)");
+ }
if (trunk_ref->ring_delay) {
snprintf(ring_delay, sizeof(ring_delay),
"%u", trunk_ref->ring_delay);
- } else
+ } else {
strcpy(ring_delay, "(none)");
- ast_cli(a->fd, "=== ==> Trunk Name: %s\n"
- "=== ==> State: %s\n"
- "=== ==> RingTimeout: %s\n"
- "=== ==> RingDelay: %s\n",
- trunk_ref->trunk->name,
- trunkstate2str(trunk_ref->state),
- ring_timeout, ring_delay);
+ }
+
+ ast_cli(a->fd, "=== ==> Trunk Name: %s\n"
+ "=== ==> State: %s\n"
+ "=== ==> RingTimeout: %s\n"
+ "=== ==> RingDelay: %s\n",
+ trunk_ref->trunk->name,
+ trunkstate2str(trunk_ref->state),
+ ring_timeout, ring_delay);
}
ast_cli(a->fd, "=== ---------------------------------------------------------\n"
"===\n");
@@ -3202,7 +3205,7 @@
const char *agifiledefault = "conf-background.agi", *tmpvar;
char meetmesecs[30] = "";
char exitcontext[AST_MAX_CONTEXT] = "";
- char recordingtmp[AST_MAX_EXTENSION] = "";
+ char recordingtmp[AST_MAX_EXTENSION * 2] = "";
char members[10] = "";
int dtmf = 0, opt_waitmarked_timeout = 0;
time_t timeout = 0;
@@ -4520,7 +4523,7 @@
char currenttime[32] = "";
char eatime[32] = "";
char bookid[51] = "";
- char recordingtmp[AST_MAX_EXTENSION] = "";
+ char recordingtmp[AST_MAX_EXTENSION * 2] = "";
char useropts[OPTIONS_LEN + 1] = ""; /* Used for RealTime conferences */
char adminopts[OPTIONS_LEN + 1] = "";
struct ast_tm tm, etm;
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 62a86f0..18352d3 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -64,6 +64,7 @@
#endif
#include <sys/stat.h>
#include <math.h>
+#include <sys/sysmacros.h>
#include "sig_analog.h"
/* Analog signaling is currently still present in chan_dahdi for use with
@@ -14320,7 +14321,7 @@
int trunkgroup;
int x, y, fd = a->fd;
int interfaceid = 0;
- char db_chan_name[20], db_answer[5];
+ char db_chan_name[20], db_answer[15];
struct dahdi_pvt *tmp;
struct dahdi_pri *pri;
diff --git a/channels/sig_pri.c b/channels/sig_pri.c
index d6b8507..f371fbf 100644
--- a/channels/sig_pri.c
+++ b/channels/sig_pri.c
@@ -2040,7 +2040,7 @@
struct sig_pri_chan *pvt = v_pvt;
struct ast_channel *chan = pvt->owner;
struct ast_frame *f;
- char ex[80];
+ char ex[128];
/* Wait up to 30 seconds for an answer */
int timeout_ms = 30000;
int ms;
@@ -2281,7 +2281,7 @@
*/
static void sig_pri_party_number_convert(struct ast_party_number *ast_number, const struct pri_party_number *pri_number, struct sig_pri_span *pri)
{
- char number[AST_MAX_EXTENSION];
+ char number[AST_MAX_EXTENSION * 2];
apply_plan_to_existing_number(number, sizeof(number), pri, pri_number->str,
pri_number->plan);
@@ -6245,7 +6245,7 @@
struct timeval lastidle = { 0, 0 };
pthread_t p;
struct ast_channel *idle;
- char idlen[80];
+ char idlen[128];
int nextidle = -1;
int haveidles;
int activeidles;
@@ -6651,7 +6651,7 @@
e->service_ack.changestatus, PRI_SPAN(e->service_ack.channel), PRI_CHANNEL(e->service_ack.channel), pri->span);
} else {
char db_chan_name[20];
- char db_answer[5];
+ char db_answer[15];
int ch;
unsigned *why;
diff --git a/channels/sig_pri.h b/channels/sig_pri.h
index d3e5350..8c9babd 100644
--- a/channels/sig_pri.h
+++ b/channels/sig_pri.h
@@ -300,7 +300,7 @@
char cid_name[AST_MAX_EXTENSION];
char cid_ani[AST_MAX_EXTENSION];
/*! \brief User tag for party id's sent from this device driver. */
- char user_tag[AST_MAX_EXTENSION];
+ char user_tag[AST_MAX_EXTENSION * 2];
char exten[AST_MAX_EXTENSION];
/* Internal variables -- Don't touch */
--
To view, visit https://gerrit.asterisk.org/6583
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: I7b5300fbf1af7d88d47129db13ad6dbdc9b553ec
Gerrit-Change-Number: 6583
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matthew Fredrickson <creslin at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20170925/ee0f422e/attachment-0001.html>
More information about the asterisk-commits
mailing list