[asterisk-bugs] [JIRA] (ASTERISK-27580) [patch] lpc10: Array may be uninitialized.
Kevin Harwell (JIRA)
noreply at issues.asterisk.org
Fri Jan 12 10:19:39 CST 2018
[ https://issues.asterisk.org/jira/browse/ASTERISK-27580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=241505#comment-241505 ]
Kevin Harwell commented on ASTERISK-27580:
------------------------------------------
[~traud], I'm assuming you'll push this patch up to gerrit, so assigning to you for now. If that turns out to not be correct just un-assign yourself.
> [patch] lpc10: Array may be uninitialized.
> ------------------------------------------
>
> Key: ASTERISK-27580
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-27580
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Codecs/codec_lpc10
> Affects Versions: 15.2.0
> Reporter: Alexander Traud
> Severity: Minor
> Labels: patch
> Attachments: lpc10_array_init.patch
>
>
> {{./configure && make}} and Ubuntu 14.04 LTS (GCC 4.8.2), Ubuntu 16.04 LTS (GCC 5.3.1), Ubuntu 18.04 LTS (GCC 7.2) report:{code}irc2pc.c:145:12: warning: 'temp[9]' may be used uninitialized in this function [-Wmaybe-uninitialized]
> pc[j] = temp[j - 1];
> ~~~~~~^~~~~~~~~~~~~
> irc2pc.c:145:12: warning: 'temp[8]' may be used uninitialized in this function [-Wmaybe-uninitialized]
> irc2pc.c:145:12: warning: 'temp[7]' may be used uninitialized in this function [-Wmaybe-uninitialized]{code}This does not happen, when optimization is level 2 or lower, like off. This does not happen in the alternative compiler _clang_. It is just GCC with (Asterisk’s default of) -O3.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list