[pacman-dev] [PATCH] meson: use 'pedantic' compiler warning level

Eli Schwartz eschwartz at archlinux.org
Fri Mar 6 02:12:55 UTC 2020


On 3/5/20 9:02 PM, Anatol Pomozov wrote:
> Hi
> 
> On Thu, Mar 5, 2020 at 4:50 PM Eli Schwartz <eschwartz at archlinux.org> wrote:
>>
>> On 3/5/20 7:42 PM, Anatol Pomozov wrote:
>>> Signed-off-by: Anatol Pomozov <anatol.pomozov at gmail.com>
>>> ---
>>>  meson.build | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/meson.build b/meson.build
>>> index 572526b2..fc81fa27 100644
>>> --- a/meson.build
>>> +++ b/meson.build
>>> @@ -7,6 +7,7 @@ project('pacman',
>>>            'prefix=/usr',
>>>            'sysconfdir=/etc',
>>>            'localstatedir=/var',
>>> +          'warning_level=3',
>>
>> We can just use meson setup --warnlevel 3, the other settings there are
>> about making sure the software works as expected.
>>
>> FWIW, meson.build already adds a bunch of -W flags automatically for
>> buildtype=debug. This would be a better place to go adding even more.
> 
> I see, so the compiler warnings (including the GNU escape symbols
> detection) are enabled at Debug mode only.
> 
> What is the reason avoid compile warnings with the Release mode?
> 'meson setup' uses Release mode by default (unless no cmdline options
> override it)

Incorrect, meson setup defaults to --buildtype=plain.

Are you using an alias or wrapper script to run meson? That might add
additional options you've forgotten about.

> and I bet most of the contributors are just going to use
> this default. Having warnings enabled with the default setup
> eliminates potential WTF moments.
> 


-- 
Eli Schwartz
Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1601 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20200305/6e83c89d/attachment.sig>


More information about the pacman-dev mailing list