Hello,
i read some Post's about this but could not get it done.
https://forum.lazarus.freepascal.org/index.php?topic=47047.0
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.
This did not work for me. I still got the warnings.
tried this
{$warnings off}
unit AnyUnit;
{$warnings on}
did not work either. I still got the Warnings
I want all the warnings / hints for code that is not mine to be disabled. How do i do it ?
You
can't disable warnings/hints this way.
The point with the package mentioned above is that a package is compiled by Lazarus and ideally only recompiled again when the units of the package are changed. Otherwise the compiler will use the precompiled units and warnings and hints that would be triggered during compilation will not be triggered if a precompiled unit is used.
So if you put your units into a separate package, with the sources located in a different directory than your main project, then any warnings/hints should only be shown when Lazarus decides to recompile the package. If you still get them then you're doing something wrong and you should explain your setup in more detail.