<p>Alexander Traud has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15078">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Compiler fixes for GCC with -Og<br><br>ASTERISK-29144<br><br>Change-Id: I2a72c072083b4492a223c6f9d73d21f4f424db62<br>---<br>M addons/ooh323c/src/ooq931.c<br>M apps/app_directory.c<br>M apps/app_voicemail.c<br>M funcs/func_odbc.c<br>4 files changed, 7 insertions(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/78/15078/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/addons/ooh323c/src/ooq931.c b/addons/ooh323c/src/ooq931.c</span><br><span>index 01a8e4a..fc18703 100644</span><br><span>--- a/addons/ooh323c/src/ooq931.c</span><br><span>+++ b/addons/ooh323c/src/ooq931.c</span><br><span>@@ -585,7 +585,7 @@</span><br><span>    unsigned int i;</span><br><span>    ASN1BOOL aligned=TRUE;</span><br><span>    int stat;</span><br><span style="color: hsl(0, 100%, 40%);">-   Q931InformationElement *ie;</span><br><span style="color: hsl(120, 100%, 40%);">+   Q931InformationElement *ie=NULL;</span><br><span>    /* OOCTXT *pctxt = &gH323ep.msgctxt; */</span><br><span>    if(q931Msg ==NULL)</span><br><span>    {</span><br><span>diff --git a/apps/app_directory.c b/apps/app_directory.c</span><br><span>index a47fe3b..f1cd0f3 100644</span><br><span>--- a/apps/app_directory.c</span><br><span>+++ b/apps/app_directory.c</span><br><span>@@ -396,7 +396,6 @@</span><br><span> {</span><br><span>    struct directory_item **block, *item;</span><br><span>        int i, limit, res = 0;</span><br><span style="color: hsl(0, 100%, 40%);">-  char buf[9];</span><br><span> </span><br><span>     /* option p(n): cellphone pause option */</span><br><span>    select_item_pause(chan, flags, opts);</span><br><span>@@ -409,13 +408,15 @@</span><br><span>                for (i = 0; i < limit && !res; i++) {</span><br><span>                     item = block[i];</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-                    snprintf(buf, sizeof(buf), "digits/%d", i + 1);</span><br><span>                    /* Press <num> for <name>, [ extension <ext> ] */</span><br><span>                  res = ast_streamfile(chan, "dir-multi1", ast_channel_language(chan));</span><br><span>                      if (!res)</span><br><span>                            res = ast_waitstream(chan, AST_DIGIT_ANY);</span><br><span style="color: hsl(0, 100%, 40%);">-                      if (!res)</span><br><span style="color: hsl(120, 100%, 40%);">+                     if (!res) {</span><br><span style="color: hsl(120, 100%, 40%);">+                           char buf[7+12]; /* INT_MIN has a length of 12 chars */</span><br><span style="color: hsl(120, 100%, 40%);">+                                snprintf(buf, sizeof(buf), "digits/%d", i + 1);</span><br><span>                            res = ast_streamfile(chan, buf, ast_channel_language(chan));</span><br><span style="color: hsl(120, 100%, 40%);">+                  }</span><br><span>                    if (!res)</span><br><span>                            res = ast_waitstream(chan, AST_DIGIT_ANY);</span><br><span>                   if (!res)</span><br><span>diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c</span><br><span>index e7ab964..940ca67 100644</span><br><span>--- a/apps/app_voicemail.c</span><br><span>+++ b/apps/app_voicemail.c</span><br><span>@@ -11303,7 +11303,7 @@</span><br><span>                     int skipuser, int max_logins, int silent)</span><br><span> {</span><br><span>       int useadsi = 0, valid = 0, logretries = 0;</span><br><span style="color: hsl(0, 100%, 40%);">-     char password[AST_MAX_EXTENSION], *passptr;</span><br><span style="color: hsl(120, 100%, 40%);">+   char password[AST_MAX_EXTENSION], *passptr = NULL;</span><br><span>   struct ast_vm_user vmus, *vmu = NULL;</span><br><span> </span><br><span>    /* If ADSI is supported, setup login screen */</span><br><span>diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c</span><br><span>index e9fe597..acebdcc 100644</span><br><span>--- a/funcs/func_odbc.c</span><br><span>+++ b/funcs/func_odbc.c</span><br><span>@@ -1181,7 +1181,7 @@</span><br><span> static int init_acf_query(struct ast_config *cfg, char *catg, struct acf_odbc_query **query)</span><br><span> {</span><br><span>         const char *tmp;</span><br><span style="color: hsl(0, 100%, 40%);">-        const char *tmp2;</span><br><span style="color: hsl(120, 100%, 40%);">+     const char *tmp2 = NULL;</span><br><span>     int i;</span><br><span> </span><br><span>   if (!cfg || !catg) {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15078">change 15078</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/15078"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I2a72c072083b4492a223c6f9d73d21f4f424db62 </div>
<div style="display:none"> Gerrit-Change-Number: 15078 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>