[asterisk-bugs] [JIRA] (ASTERISK-27903) menuselect: GCC 8: restrict-qualified parameter passed and aliased.
Asterisk Team (JIRA)
noreply at issues.asterisk.org
Thu Jun 7 07:45:54 CDT 2018
[ https://issues.asterisk.org/jira/browse/ASTERISK-27903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=243735#comment-243735 ]
Asterisk Team commented on ASTERISK-27903:
------------------------------------------
Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.
A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.
Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].
> menuselect: GCC 8: restrict-qualified parameter passed and aliased.
> -------------------------------------------------------------------
>
> Key: ASTERISK-27903
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-27903
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Core/BuildSystem
> Affects Versions: 13.21.0, 15.4.0
> Environment: GCC 8.1
> Reporter: Alexander Traud
>
> This is a follow-up to ASTERISK-27824. In Fedora 28, the compiler GCC 8.1.1 gives:{code}menuselect_curses.c: In function 'display_mem_info':
> menuselect_curses.c:230:12: warning: passing argument 1 to restrict-qualified parameter aliases with argument 3 [-Wrestrict]
> sprintf(buf, "%s%*.*s%s", buf, new_line ? 0 : 1, new_line ? 0 : 1, " ", word);
> ^~~ ~~~{code}This is because [man sprintf|http://manpages.ubuntu.com/manpages/bionic/man3/sprintf.3.html], section Note:{quote}Some programs imprudently rely on code such as the following
> sprintf(buf, "%s some further text", buf);
> to append text to buf. However, the standards explicitly note that the results are undefined if source and destination buffers overlap when calling sprintf(), snprintf(), vsprintf(), and vsnprintf().{quote}Thanks to [dcb314|https://github.com/dyne/frei0r/issues/22] for documenting this. Hopefully, someone is going to fix this.
> Warnings in Menuselect do not get to an Error even with Developer Mode enabled. Furthermore, I do not use that piece of code, normally. So it does not block me personally.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list