]> 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 15:56:03 +0000 (09:56 -0600)
commit2d1713395be151a741fd21366275ceb2afba541c
tree8905a7e45a5639d81f601cec1c0c04acbfc8426f
parent18cc090761dbc2c0d2c0f1e37360445476f14607
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