[Asterisk-code-review] main/say: Work around gcc 9 format-truncation false positive (asterisk[13])

Alexander Traud asteriskteam at digium.com
Tue Oct 27 09:10:32 CDT 2020


Alexander Traud has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/14501 )

Change subject: main/say: Work around gcc 9 format-truncation false positive
......................................................................


Patch Set 1:

Working on a similar issue while compiling with GCC 10.2 and -Og. However, my issue at a completely different area in Asterisk and I am in 64 bit. format-truncation= has a level (0-2; Asterisk uses level 1) and depends heavily on the optimization level as well (Asterisk uses -O0 or -O3). @walter, can you double-check the levels you are using by going for NOISY=YES or outputting the whole GCC options? Not that you have set OPTIMIZE as environment variable before you make. Anyway, I do not see a reason not to go for the 12 bytes, the maximum length an int (INT_MIN → "-2147483648") can get, any comments @gjoseph? buf is 20 bytes anyway. My wild guess: The while-loop is the issue here.


-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14501
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: Ic7a70120188c9aa525a6d70289385bfce878438a
Gerrit-Change-Number: 14501
Gerrit-PatchSet: 1
Gerrit-Owner: Walter Doekes <walter+asterisk at wjd.nu>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-CC: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Comment-Date: Tue, 27 Oct 2020 14:10:32 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20201027/6f7a6eba/attachment.html>


More information about the asterisk-code-review mailing list