Effective Way To Disable Warnings / Hints By Unit? lazarus / 9-Editor ---------------------------------------------------------------------- del · 2019-10-11 23:52 I've tried this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit blcksock;{$warnings off}{$hints off}{$notes off}  I've tried this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit blcksock;{$warnings off}{$hints off}{$notes off}....... end;{$warnings on}{$hints on}{$notes on}end.  I've tried this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i implementation{$warnings off}{$hints off}{$notes off}  I've tried disabling hints / warnings under Project-Project Options- Messages then enabling them in my units by Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit StatsMath;{$warnings on}{$hints on}{$notes on}......end;{$warnings off}{$hints off}{$notes off}end.  Which doesn't help at all - they all stay disabled. I get varying degrees of success with the other approaches. One unit which absolutely refuses to cooperate is "blcksock" - a part of the Ararat Synapse library. So basically I want all the warnings / hints for code that is not mine to be disabled. What's the best way to do this? ---------------------------------------------------------------------- del · 2019-10-13 16:50 Problem solved. I'm solving all my own problems. That's the way you guys like it. Better to let him figure out how to fish than to just give him a fish. Cuz he'll just hungry again and pester us some more. OK - so I was inviting in all these dozens and dozens of warning and hints which had nothing to do with my own code. The reason that they were appearing is that in my project inspector I had explicit include paths to files which were inside packages. Instead of just making the package a "Required Package". Now I've gotten rid of all my cherry-picked explicit paths to individual .pas files and have simply made the packages that they belong to "Required". This shut down all the warnings and hints from code that is not mine. I like it - now I can attack my own foibles and not be distracted by everything else in the ecosphere. ---------------------------------------------------------------------- Thaddy · 2019-10-13 17:08 Quote from: del on October 12, 2019, 01:52:12 am So basically I want all the warnings / hints for code that is not mine to be disabled. What's the best way to do this? Then you just compile FPC and Lazarus with warnings off etc. Either through the Lazarus IDE or through the FPC command line parameters. That's also the official way to achieve that. E.g. make clean all install OPT='-vw-'. The compiler itself is compiled with -Sew so is unlikely to throw warnings ---------------------------------------------------------------------- del · 2019-10-13 17:50 Quote from: Thaddy on October 13, 2019, 07:08:53 pmThen you just compile FPC and Lazarus with warnings off etc. Either through the Lazarus IDE or through the FPC command line parameters. That's also the official way to achieve that. E.g. make clean all install OPT='-vw-'. The compiler itself is compiled with -Sew so is unlikely to throw warnings  I like warnings - the compiler is my friend. I just don't want to be warned about unused variables in obscure files deep inside third party packages. That ship has sailed.