[fpc-devel] Promote specific warning into error
Marc Weustink
marc at dommelstein.nl
Fri Sep 24 15:04:38 CEST 2021
On 24-9-2021 14:41, Michael Van Canneyt via fpc-devel wrote:
>
>
> On Fri, 24 Sep 2021, Marc Weustink via fpc-devel wrote:
>
>> On 24-9-2021 14:24, Marc Weustink via fpc-devel wrote:
>>> Hi,
>>>
>>> Is there a way to promote a specific warning(4056) into an error ?
>>
>> from the commandline I mean. I've found {$warn 4056 error} but I don't
>> want to put this in all sources
>
> The command-line only allows to set this for all warnings/hints/notes.
>
> -Se<x> Error options. <x> is a combination of the following:
> <n> : Compiler halts after the <n> errors (default is 1)
> h : Compiler also halts after hints
> n : Compiler also halts after notes
> w : Compiler also halts after warnings
>
> I didn't see a way to do this for specific message numbers.
> I think at this point your best bet is to create a small include file
> that is included in all files ?
what I've done for the current project (need to check more) is -Sew and
several -vmXXXX for all warnings I'm not interested in (like deprecated,
uninitialized variables passed to SetLength() etc)
Marc
More information about the fpc-devel
mailing list