Can't suppress compiler warnings


Delphi 10.4.2, Web Core
I have large projects (generated by automatic source code conversions) with many unused variables and procedures, so I want to suppress the "... not used" messages when compiling.
With the commandline compiler, it's no problem bei adding the option "-ShowNothing" to the command line.
When I try to add this option in the Delphi IDE (Tools, Options, TMS Web, Options, additional compiler parameters), this is ignored, and it is not even saved. When reopening this dialog, the inserted value is gone!
What am I doing wrong?
Best regards,
Meik Stoll

I cannot reproduce that custom compiler parameters are not saved.
When I add this, save the project, reopen, the custom command line parameter reappears.
I cannot see that pas2js compiler supports a parameter like -ShowNothing
so, it is normal that when you add this as-is, the pas2js compiler doesn't understand it.

Thank you!
My mistake (I thought that the parameters for the command line compiler and pas2js.exe were the same...)

There are 2 places for custom parameters: 1) the general (Tools, Options...) and 2) in the project options (Project, Options...).
I first used 1), this didn't work (entry was not saved).
No I tried 2), this works in the manner that the entry is saved, but it doesn't help with the problem, because the option -vw- is included before the option -viw in the command line when calling pas2s.exe, and so it is overwritten and the warnings can not be suppressed.
Any ideas?

The IDE needs a certain level of logging as it is from the log output it determines the position in the code to indicate where a possible error is.
Maybe with the -vmXXXX option you can suppress types of messages you do not want to see

Thank you for the quick reply. Unfortunately I don't find information about the numbers of the messages.

But I found a working solution: By adding the directives

{$Warnings off}
{$Hints off}

to the source code file, it now works well for me.

1 Like