Delphi Compiler Warnings - Defaults button

When editing the “Build Delphi” task and I switch to the Compiler tab, the bottom-right has a list of options for controlling Messages and a button to customize which Warnings you can disable (I’m assuming that’s for the “Treat warnings as errors” option).

In that pop-up “Compiler Warnings” box, what does the “Defaults” button do?

I hoped it would allow me to use a pre-selected list of enabled/disabled warnings that I could apply to new Delphi projects but I don’t see where to set that list nor does that button seem to do anything.

Hi David

What that button should do is reset the warnings back the the default values (ie reset any overrides), however at some point in time the button event handler has become disconnected so right now it does indeed do nothing. I can also see that we are missing some of the newer warnings in that list - will fix and post a new build with that fix shortly.

Thanks. So the default values are basically all warnings set to True, right?

If so, I’d like to propose a feature request to allow me to customize that default list. For my situation, I have hundreds of Windows-only programs (Delphi projects) I’m upgrading from an old code-base where many poor programming techniques were practiced over the years and I’ve turned on “treat warnings as errors” to force clean-up of the code but then need to turn off Platform Symbol and Platform Unit warnings because of the prevalent use of Windows API calls. It’s tedious customizing that list for every project build task.

Not quite, some warnings in delphi default to false. So the defaults are what ever the values are in a new project.

I will look into it. My main concern would be the potential for “works on my machine issues”.

Oh, so if I have a project in Delphi I’m migrating and setting up the options, then am ready to put it in our build process, it will pull in the warnings from the project file initially; after that, I can disconnect it from the project file and it’ll be set. That’ll work!

Also, I can copy other FB Build Tasks that already have all the options configured and just change the project to which it points (they’re all very similar). That works, too. :smiling_face_with_sunglasses:

Thanks!

Yes that should work. It’s a very long time since I looked at this code so need to familiarise myself with how it all works - once I do I’ll update the list to include the missing newer warnings (from a quick test there are 5 missing).

1 Like

This build fixes the defaults button not working and adds support for the newer warnings

https://downloads.finalbuilder.com/downloads/finalbuilder/850/FB850_3484.exe

1 Like