]> git.ipfire.org Git - thirdparty/asterisk.git/commit
app_voicemail: Add workaround for a gcc 10 issue with -Wrestrict
authorGeorge Joseph <gjoseph@digium.com>
Thu, 30 Apr 2020 15:56:03 +0000 (09:56 -0600)
committerGeorge Joseph <gjoseph@digium.com>
Thu, 30 Apr 2020 16:09:48 +0000 (11:09 -0500)
commitcf5e30dd0ed3cc7ccce37e87420d7a1290cf034f
treeaad2f9a0185e8e65cc555ea8cccf40529b5de14c
parent0ce4a773673c3639bb500801fae8d24b220e67b4
app_voicemail: Add workaround for a gcc 10 issue with -Wrestrict

The gcc 10 -Wrestrict option was causing "overlap" errors when
snprintf was copying one char[256] structure member to another
char[256] member in the same structure.

Using ast_alloca instead of declaring the structure inline
solves the issue.

Here's a link to the "enhancement":
https://gcc.gnu.org/legacy-ml/gcc-patches/2019-10/msg00570.html

We may follow up with a gcc bug report.

Change-Id: Ie0099adcb0a9727bd9aa99e024dd912a67eaf534
apps/app_voicemail.c