Forum > Beginners

Suppressing warnings

<< < (2/5) > >>

KodeZwerg:

--- Quote from: nimble2010 on February 22, 2024, 02:19:45 pm ---
--- 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

--- End quote ---
Actually I was meaning by OPM, like I show for the KControl package on screenshot

nimble2010:

--- Quote from: KodeZwerg on February 22, 2024, 02:37:53 pm ---
--- Quote from: nimble2010 on February 22, 2024, 02:19:45 pm ---
--- 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

--- End quote ---
Actually I was meaning by OPM, like I show for the KControl package on screenshot

--- End quote ---

I did install the packages from the OPM originally.

Thaddy:
Suppressing warnings and hints is not difficult at all.
Compile with -vq option. That adds the warning number to the compiler output. Then either in code or by compiler option disable them:

--- 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";}};} ---{$warn < the number > off} or on the command line -vw<the number>- (the minus sign)
This is a local directive so can be very finely grained with {$push}{$pop}

All of this is in the documentation of course.

TRon:

--- Quote from: Thaddy on February 22, 2024, 02:47:58 pm ---Compile with -vq option. That adds the warning number to the compiler output. Then either in code or by compiler option disable them:

--- 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";}};} ---{$warn < the number > off} or on the command line -vw<the number>- (the minus sign)

--- End quote ---
Huh ?

Is that a new feature or something  I simply did not know ? (using -vwXXX- at 3.2.2 seem to suppress any output from the compiler for me (except for the FPC header))

I ask because from the manual I got the notion that -vm is used to (globally) suppress a specific warning (and is what I have been using all this time)

@nimble2010:
You can use the global -vm switch and supply the message numbers in order to suppress the warnings. But it depends on when it is happening. I do not know to suppress when you get those message during installation of the packages (other than mentioned by Thaddy in the source-code)

Thaddy:

--- Quote from: TRon on February 22, 2024, 05:07:19 pm ---Is that a new feature or something  I simply did not know ?
--- End quote ---
You simply did not know and that is because you did not care about examining the documentation.

Note that retrieving the numbers is not obvious to everyone.
I use 6060 every day thanks to Jonas. (Case ending, trunk )

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version