[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: warnings with -O0
From: |
Matteo Croce |
Subject: |
Re: warnings with -O0 |
Date: |
Thu, 24 Oct 2024 19:38:09 +0200 |
Il giorno mar 22 ott 2024 alle ore 21:22 Paul Eggert
<eggert@cs.ucla.edu> ha scritto:
>
> Yes, as a general rule we don't worry about --enable-gcc-warnings with
> unusual options like -O0. Life is too short to waste it on pacifying
> false positives that don't actually help find bugs.
Hi,
while I generally agree that modern compilers _sometimes_ are too
pedantic, in this case we have a macro, paxfatal(), which accepts two
arguments but we pass three arguments to it.
Definitely not a false positive, at least this one.
Or, in case of src/system.c, we have a NULL pointer check before its
first usage:
if (dir->exclude_list)
return;
...
if (faccessat (dir ? dir->fd : chdir_fd, ...
Either the 'dir' pointer is never NULL (and the check is useless), or
nobody triggered the crash so far (and should be fixed then).
Regards,
--
Matteo Croce
perl -e 'for($t=0;;$t++){print chr($t*($t>>8|$t>>13)&255)}' |aplay