[Home]

Summary:ASTERISK-26157: Build: Fix errors highlighted by GCC 6.x
Reporter:George Joseph (gjoseph)Labels:
Date Opened:2016-06-28 07:58:32Date Closed:2016-06-28 14:11:52
Priority:MinorRegression?
Status:Closed/CompleteComponents:Core/BuildSystem
Versions:SVN 13.9.1 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Fedora 24 gcc 6.1.1 Attachments:
Description:{noformat}
func_env.c: In function ‘file_read’:
func_env.c:627:91: error: array subscript is below array bounds [-Werror=array-bounds]
   for (pos = (end < sizeof(fbuf) ? fbuf + end - 1 : fbuf + sizeof(fbuf) - 1); pos > fbuf - 1; pos--) {
                                                                                     ~~~~~^~~
func_env.c: In function ‘file_write’:
func_env.c:1027:53: error: array subscript is below array bounds [-Werror=array-bounds]
     for (pos = fbuf + sizeof(fbuf) - 1; pos > fbuf - 1; pos--) {
                                               ~~~~~^~~
{noformat}

{noformat}
stdtime/localtime.c: In function ‘ast_get_dst_info’:
stdtime/localtime.c:1852:3: error: this ‘while’ clause does not guard... [-Werror=misleading-indentation]
  while (sp->ttis[i].tt_isdst)
  ^~~~~
stdtime/localtime.c:1857:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘while’
   *gmt_off = sp->ttis[i].tt_gmtoff;
   ^
{noformat}

{noformat}
chan_unistim.c:571:28: error: ‘packet_send_CloseAudioStreamTX’ defined but not used [-Werror=unused-const-variable=]
static const unsigned char packet_send_CloseAudioStreamTX[] = { 0x16, 0x05, 0x31, 0xff, 0x00 };
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
chan_unistim.c:570:28: error: ‘packet_send_CloseAudioStreamRX’ defined but not used [-Werror=unused-const-variable=]
static const unsigned char packet_send_CloseAudioStreamRX[] = { 0x16, 0x05, 0x31, 0x00, 0xff };
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{noformat}

{noformat}
say.c: In function ‘ast_say_date_with_format_it’:
say.c:5208:5: error: this ‘else’ clause does not guard... [-Werror=misleading-indentation]
    else
    ^~~~
say.c:5210:6: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘else’
     res = wait_file(chan, ints, nextmsg, lang);
     ^~~
say.c:5232:5: error: this ‘else’ clause does not guard... [-Werror=misleading-indentation]
    else
    ^~~~
say.c:5234:6: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘else’
     res = wait_file(chan, ints, nextmsg, lang);
     ^~~
{noformat}


Comments: