Forum > Beginners

Suppressing warnings

(1/5) > >>

nimble2010:
Hello there!

I noticed that there are some warnings/notes that are missing in the Project Options "Messages" panel and that makes it difficult to suppress them, there are also certain warnings that I couldn't get their ids to suppress them using the warn directive like the following:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Messages, Warnings: 5Warning: other unit files search path (aka unit path) of "KControlsLaz 1.7.3" contains "xxx\Plugins\KControls\source", which belongs to package "KControlsBase" Warning: other unit files search path (aka unit path) of "GLScene_DesignTime 1.0" contains "xxx\Plugins\GLSceneLCL\Source", which belongs to package "GLScene_RunTime" Warning: other unit files search path (aka unit path) of "GLScene_RunTime 1.0" contains "xxx\Plugins\GLSceneLCL\Source\Basis", which belongs to package "GLScene_DesignTime" Warning: other sources path of package "lnetbase 0.6.6" contains directory "..\lib" which is already in the unit search path.
I know that I'm not separating runtime/designtime code but that's the way I got such addons/plugins installed. I also read somewhere on these packages' repos that this is a Lazarus bug, not that important to me I just need to know how to disable such warnings.

KodeZwerg:

--- Quote from: nimble2010 on February 22, 2024, 01:24:12 pm ---I just need to know how to disable such warnings.
--- End quote ---
Easiest way, by installing packages like they should be installed.

TRon:
The normal way to get additional information on a message/warning is to use -vq (which will issue the number of the message) and then use {$WARN XXX OFF} (were x is the actual number of the message) but if these messages are specific to Lazarus then I am not sure. I always though all messages are generated by the (fpc) compiler.

nimble2010:

--- Quote from: KodeZwerg on February 22, 2024, 01:55:02 pm ---
--- Quote from: nimble2010 on February 22, 2024, 01:24:12 pm ---I just need to know how to disable such warnings.
--- End quote ---
Easiest way, by installing packages like they should be installed.

--- End quote ---

Which is what I did:
https://sourceforge.net/p/glscene/wiki/Lazarus%20Installation/
https://github.com/kryslt/KControls/issues/25

nimble2010:

--- Quote from: TRon on February 22, 2024, 01:56:23 pm ---The normal way to get additional information on a message/warning is to use -vq (which will issue the number of the message) and then use {$WARN XXX OFF} (were x is the actual number of the message) but if these messages are specific to Lazarus then I am not sure. I always though all messages are generated by the (fpc) compiler.

--- End quote ---

Yes but even if I got the message id, how would I use warn? It's a config issue, there are two packages that share the same paths, one is dependent on another:

Package config 1:

<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
  <Package Version="5">
    <Name Value="GLScene_RunTime"/>
    <AddToProjectUsesSection Value="True"/>
    <CompilerOptions>
      <Version Value="11"/>
      <SearchPaths>
        <IncludeFiles Value="../Source"/>
        <OtherUnitFiles Value="../Source;../Source/Basis;../Source/FileFormats;../Source/Shaders;../Source/GameAPIs;../Source/ScriptingAPIs;../Source/Plateform;../Source/DesignTime"/>
        <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
      </SearchPaths>
Package config 2:

<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
  <Package Version="5">
    <Name Value="GLScene_DesignTime"/>
    <Type Value="DesignTime"/>
    <AddToProjectUsesSection Value="True"/>
    <CompilerOptions>
      <Version Value="11"/>
      <SearchPaths>
        <IncludeFiles Value="../Source"/>
        <OtherUnitFiles Value="../Source;../Source/Basis;../Source/DesignTime;../Source/Plateform;../Source/GameAPIs;../Source/Shaders;../Source/SoundVideoAPIs;../Source/FileFormats"/>
        <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
        <SrcPath Value="../Lazarus"/>
      </SearchPaths>
"GLScene_RunTime" is a required package for "GLScene_DesignTime".

Navigation

[0] Message Index

[#] Next page

Go to full version