build: A few gcc 7 error fixes
authorGeorge Joseph <gjoseph@digium.com>
Mon, 25 Sep 2017 12:25:06 +0000 (06:25 -0600)
committerGeorge Joseph <gjoseph@digium.com>
Mon, 25 Sep 2017 12:32:14 +0000 (07:32 -0500)
Change-Id: I7b5300fbf1af7d88d47129db13ad6dbdc9b553ec

apps/app_meetme.c
channels/chan_dahdi.c
channels/sig_pri.c
channels/sig_pri.h

index d98c418..7ca9ba3 100644 (file)
@@ -2251,20 +2251,23 @@ static char *sla_show_stations(struct ast_cli_entry *e, int cmd, struct ast_cli_
                        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 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc
        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 @@ static struct ast_conference *find_conf_realtime(struct ast_channel *chan, char
                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;
index 4f717ff..828753a 100644 (file)
@@ -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 @@ static char *handle_pri_service_generic(struct ast_cli_entry *e, int cmd, struct
        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;
 
index 1b228af..fbc4e40 100644 (file)
@@ -2040,7 +2040,7 @@ static void *do_idle_thread(void *v_pvt)
        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_name_convert(struct ast_party_name *ast_name, const st
  */
 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 @@ static void *pri_dchannel(void *vpri)
        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 @@ static void *pri_dchannel(void *vpri)
                                                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;
 
index d3e5350..8c9babd 100644 (file)
@@ -300,7 +300,7 @@ struct sig_pri_chan {
        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 */