[fpc-devel] Howto hide Hint: Parameter "yyy" not used

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Oct 1 20:25:54 CEST 2008


On 29 Sep 2008, at 16:50, petr.kristan at epos.cz wrote:

> On Mon, Sep 29, 2008 at 11:49:29AM +0200, Jonas Maebe wrote:
>
>>
>> On 29 Sep 2008, at 11:41, Paul Ishenin wrote:
>>
>>> Jonas Maebe ??????????:
>>>> That's just a hack, and you have to regenerate the message file  
>>>> for every
>>>> new FPC release.
>>>
>>> Ofcource, but what can we do simple fpc users ;)
>>
>> Submit a patch. The message handling code really isn't rocket  
>> science. It's
>> pretty much all in compiler/verbose.pas
> In the attachment is a little patch. With cmdline option - 
> vm05024,05025
> you can suppress messages with idx 05024 and 05025.

It's a good start, but this patch is not ready to be committed:
a) it is limited to 10 suppressions
b) people have to look up the error number in the message file first
c) if you change the limitation in a), the code will become  
exponentially slower do to having to go over the entire suppression  
array every time a message has to be shown

A better approach may be to add a method to TMessage (in the cmsg.pas  
unit) to clear the verbosity level (replace all verbosity indicators  
with '_'). And to add an option to the compiler to also show the  
message number when printing output (so people can use this to get the  
numbers of the messages they want to suppress).

> But I'am not sure if really realized msgtxt.inc rocket science :).  
> That is why I do not
> change fpc help message in the patch.

It is automatically generated from compiler/msg/errore.msg (a plain  
text file) when you make the compiler. So just a patch to compiler/msg/ 
errore.msg is fine.

Thanks,


Jonas



More information about the fpc-devel mailing list