[Asterisk-code-review] build: A few gcc 7 error fixes (asterisk[master])
George Joseph
asteriskteam at digium.com
Mon Sep 25 07:32:14 CDT 2017
George Joseph has uploaded this change for review. ( https://gerrit.asterisk.org/6587
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(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/87/6587/1
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index d98c418..7ca9ba3 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -2251,20 +2251,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");
@@ -3199,7 +3202,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;
@@ -4517,7 +4520,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 4f717ff..828753a 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -60,6 +60,7 @@
#include <signal.h>
#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
@@ -14210,7 +14211,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 1b228af..fbc4e40 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;
@@ -2279,7 +2279,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);
@@ -6233,7 +6233,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;
@@ -6639,7 +6639,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/6587
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7b5300fbf1af7d88d47129db13ad6dbdc9b553ec
Gerrit-Change-Number: 6587
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170925/0da5bce8/attachment.html>
More information about the asterisk-code-review
mailing list