[asterisk-dev] Tons of warnings compiling Asterisk 16.24.1

Dennis Buteyn dennis.buteyn at xorcom.com
Wed May 11 04:12:38 CDT 2022


On 5/10/22 15:21, Joshua C. Colp wrote:
> On Tue, May 10, 2022 at 9:10 AM Dennis Buteyn 
> <dennis.buteyn at xorcom.com> wrote:
>
>     Noticed a ton of warnings (-Wformat-truncation, -Wunused-result,
>     -Wstringop-overflow, -Wstringop-truncation, -Wlto-type-mismatch,
>     -Wfree-nonheap-object, -Warray-bounds) compiling Asterisk 16.24.1
>     on the
>     few compilers I tried:
>
>     gcc (Debian 8.3.0-6) 8.3.0
>     gcc (Debian 10.2.1-6) 10.2.1 20210110
>     gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
>     gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
>     gcc (Ubuntu 11.2.0-7ubuntu2) 11.2.0
>
>     Just curious if anyone is aware of these warnings and whether they
>     have
>     been resolved in later revisions.
>
>
> Are these the default warning options when built in developer mode? If 
> so, then we take care of them as soon as we become aware - and we just 
> did a batch of GCC12 fixes to take care of the latest ones. Otherwise 
> you'd need to be more specific about what exactly is showing them. For 
> example, if it's PJSIP ones we generally don't touch it and such fixes 
> would need to go upstream. If these are options you've set, then we 
> wouldn't have seen them.
>

Rebased on master (a24979a2d7) and ignoring anything PJSIP-related, 
still getting a bunch of warnings with gcc (Ubuntu 11.2.0-7ubuntu2) 
11.2.0 (attached).

Compiler flags used:

-Wformat
-Werror=format-security
-Wdate-time
-Wall
-Wstrict-prototypes
-Wmissing-prototypes
-Wmissing-declarations
-Wl,--warn-common

As for the recent fixes, I guess we just need to wait for 16.27.

-- 
Dennis Buteyn
Xorcom Ltd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20220511/b0a228b5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: errors.log
Type: text/x-log
Size: 61757 bytes
Desc: not available
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20220511/b0a228b5/attachment-0001.bin>


More information about the asterisk-dev mailing list