2
votes

Compiler hints are being included in the build messages as warnings when I compile any project on my installation of Delphi 2007, like so:

[DCC Warning] Unit1.pas(30): H2077 Value assigned to 'i' never used

In my real project this persists even when I disable Show hints in the project options, however in a new test project this setting does hide these lines. Other people seem to see hints preceded by [DCC Hint], is there any way I can fix this?

1
Not to nag, but why do you care about this - shouldn't your code just compile without warnings and messages? They are there for a reasonJan Doggen
Hints and warnings are quite different: a) hints should not impact the running of your code and can often be legitimately ignored; and b) you can't disable specific hints. eg see: stackoverflow.com/a/632328/139560Jamie Kitson
I would never ignore either. Hints may be ignored, but they are a sign that something is not quite right, so I would not ignore them.Rudy Velthuis

1 Answers

2
votes

The QC entry reporting this issue eight years ago was closed because it couldn't be reproduced, so there is likely no fix.

You might try deleting your project's .dsk file. That sometimes helps make spurious IDE issues go away.

Your most immediate course of action is "tweaking the code," as compiler developer Allen Bauer suggests in the answer you cited in comments. Hints might still indicate problems in your code, such as unfinished algorithms. When you get complacent about compiler messages, then you're less likely to notice when a new one crops up that really does require attention.

Eventually, you'll want to upgrade to a more recent Delphi version.