Compiler Hints and Warnings are an important indicator of the quality of the code you are compiling. It dismays me that I have often seen a ton of compiler warnings on commercial components suites when I compile them. It makes you question the care taken when writing the code.
Compiler Hints and Warnings should be treated as potential coding errors. Each one should be addressed to ensure it will not cause a errant behaviour at run-time, and the code in question is properly structured. It is good to see I am not alone in this view. So Take a hint (pun intended), and clean up your hints and warnings.
Sometimes this isn’t so easy. For instance, if component requires a given unit, for example Vcl.ImgList, as the TcxCustomTreeList does, it will add the unit to the uses clause automatically. You might then get a warning like W1000 Symbol ‘TImageIndex’ is deprecated: ‘Use System.UITypes.TImageIndex’. Unfortunately, adding System.UITypes and removing Vcl.ImgList just results in the IDE re-injecting Vcl.ImgList back into the uses clause and reporting the same warning. I really don’t want to turn off this warning globally so the best option that I know of is to add {$WARN SYMBOL_DEPRECATED OFF} to the interface section of the unit in question. While this solution may not be ideal, it allowed me to “address” the warning so new compiler hints and warnings that may actually indicate a flaw in the code do not get lost in a multitude of messages. Clean code is less likely to be flawed code.