Forum > General

Identifying and ignoring benign hints

(1/2) > >>

MarkMLl:
This applies to Lazarus 2.0.6 with FPC 3.0.4 and later, on x86_64 Linux.

In the past I've gone through some of my frequently-used units making sure that hints were suppressed in cases where I knew they were benign:


--- 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";}};} ---        {%H- 5028 } lcl_fullversion = ((lcl_major *  100 + lcl_minor) * 100 + lcl_release) * 100 + lcl_patch;        {%H-}lcl_fullversion2 = ((lcl_major *  1000 + lcl_minor) * 1000 + lcl_release) * 1000 + lcl_patch; 
Has something changed in the IDE: the first form, with the error number, seems to no longer suppress the "unused" hint associated with that line while the second does?

Please could somebody remind me which compiler(?) option I need in order to see the error numbers in the message window, so that if it still works I can be precise about suppressing hints.

MarkMLl

PascalDragon:

--- Quote from: MarkMLl on October 09, 2021, 06:03:47 pm ---Please could somebody remind me which compiler(?) option I need in order to see the error numbers in the message window, so that if it still works I can be precise about suppressing hints.

--- End quote ---

You know that the compiler has a help output listing all supported options? ;)


--- Code: --- -v<x>  Be verbose. <x> is a combination of the following letters:
      e : Show errors (default)       0 : Show nothing (except errors)
      w : Show warnings               u : Show unit info
      n : Show notes                  t : Show tried/used files
      h : Show hints                  c : Show conditionals
      i : Show general info           d : Show debug info
      l : Show linenumbers            r : Rhide/GCC compatibility mode
      s : Show time stamps            q : Show message numbers
      a : Show everything             x : Show info about invoked tools
      b : Write file names messages   p : Write tree.log with parse tree
          with full path              v : Write fpcdebug.txt with
      z : Write output to stderr          lots of debugging info
      m<x>,<y> : Do not show messages numbered <x> and <y>
--- End code ---

So what you're looking for is -vq.

MarkMLl:

--- Quote from: PascalDragon on October 11, 2021, 01:43:11 pm ---You know that the compiler has a help output listing all supported options? ;)

--- End quote ---

Yes, and I explicitly checked that in case I was overlooking something.


--- Quote ---So what you're looking for is -vq.

--- End quote ---

I've already got it in my custom options:


-dHAS_SVN
-dHAS_FPC_SVN
-vq


and Lazarus isn't displaying the error numbers:


Project: Executing command before: Success
Compile Project, Target: gpx_static_diff: Success, Hints: 5
inifilesabout.pas(687,25) Hint: Local variable "binfile" does not seem to be initialized
inifilesabout.pas(688,72) Hint: Local variable "secLen" does not seem to be initialized
inifilesabout.pas(688,64) Hint: Local variable "secOfs" does not seem to be initialized
inifilesabout.pas(694,20) Hint: Local variable "idBuff" does not seem to be initialized
inifilesabout.pas(699,45) Hint: Local variable "i" does not seem to be initialized
Project: Executing command after: Success
Mon 11 Oct 13:10:59 BST 2021


It used to, with (I think) the same projects... and I can't see what I've changed.

MarkMLl

Thaddy:

--- Quote from: PascalDragon on October 11, 2021, 01:43:11 pm ---You know that the compiler has a help output listing all supported options? ;)

--- End quote ---
With the Annoyance you have to specify each by item, Sarah....

MarkMLl:

--- Quote from: Thaddy on October 11, 2021, 02:28:39 pm ---
--- Quote from: PascalDragon on October 11, 2021, 01:43:11 pm ---You know that the compiler has a help output listing all supported options? ;)

--- End quote ---
With the Annoyance you have to specify each by item, Sarah....

--- End quote ---

Steady on, I might have been using a Mac and as such (apparently) unable to view such things.

(I seem to be spending a lot of time pouring oil on troubled flames :-)

MarkMLl

Navigation

[0] Message Index

[#] Next page

Go to full version