[Asterisk-code-review] GCC12: Fixes for 16+ (asterisk[16])

Kevin Harwell asteriskteam at digium.com
Wed May 4 18:32:51 CDT 2022


Attention is currently required from: George Joseph.
Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/18529 )

Change subject: GCC12: Fixes for 16+
......................................................................


Patch Set 1: Code-Review-1

(3 comments)

File apps/app_festival.c:

https://gerrit.asterisk.org/c/asterisk/+/18529/comment/df73470c_12ac9d09 
PS1, Line 436: 	if (strlen(cachedir) + sizeof(MD5Hex) + 1 <= MAXFESTLEN && (usecache == -1)) {
Not sure this is the right fix here? Two possible problems:

1) sizeof(x) is not always equal to strlen(x)
2) with sizeof I think you can remove the "+ 1" since sizeof returns the full size of the "array" whereas strlen returns the length of the string -1 for NULL char.


File channels/chan_sip.c:

https://gerrit.asterisk.org/c/asterisk/+/18529/comment/c561a2c6_d6a7f5aa 
PS1, Line 35425: 		if ((void *)(expected_start) != (void *)start) {			\
Curious what was the problem here? Comparison to NULL needs a cast now?


File include/asterisk/strings.h:

https://gerrit.asterisk.org/c/asterisk/+/18529/comment/3e9991d8_6b6bff5d 
PS1, Line 396: 	volatile size_t sz = size;
             : 	volatile char *sp = (char *)src;
I _think_ this breaks ABI as this is an inline function defined in a header, so altering stuff here could change the size of the resulting library.



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

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Ia081ca1bcfb329df6487c4660aaf1944309eb570
Gerrit-Change-Number: 18529
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Attention: George Joseph <gjoseph at digium.com>
Gerrit-Comment-Date: Wed, 04 May 2022 23:32:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220504/66ebf6ae/attachment.html>


More information about the asterisk-code-review mailing list