[asterisk-bugs] [JIRA] (ASTERISK-27768) [patch] app_voicemail: Two variables may be uninitialized.
Alexander Traud (JIRA)
noreply at issues.asterisk.org
Fri Mar 23 07:18:39 CDT 2018
Alexander Traud created ASTERISK-27768:
------------------------------------------
Summary: [patch] app_voicemail: Two variables may be uninitialized.
Key: ASTERISK-27768
URL: https://issues.asterisk.org/jira/browse/ASTERISK-27768
Project: Asterisk
Issue Type: Bug
Security Level: None
Components: Applications/app_voicemail
Affects Versions: 15.3.0
Reporter: Alexander Traud
Severity: Minor
Attachments: app_voicemail_init.patch
{{./configure && make}} and Gentoo Linux 17.0 (GCC 6.4.0) reports:
{code}warning: 'new' may be used uninitialized in this function [-Wmaybe-uninitialized]
warning: 'old' 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_ or GCC 7. It is just GCC 6 with (Asterisk's default of) -O3.
Although the attached path fixes this, I am not happy with it. Therefore, it is not planned to submit that patch for review. Perhaps one day, I find the time to investigate what GCC is doing exactly. Especially because that happens only at -O3 and higher. -O2 and lower, everything is fine.
ASTERISK-27580 is similar because that happens at -O3 only as well. However on this platform, ASTERISK-27580 does not happen at all. Go figure!
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list