Recent

Author Topic: Polishing LazUtils for Laz 2.2.0  (Read 2096 times)

Muso

  • Full Member
  • ***
  • Posts: 247
Polishing LazUtils for Laz 2.2.0
« on: October 27, 2021, 03:16:32 am »
Since Laz 2.2.0 is close to be released, maybe LazUtils could be polished to get less compiler warnings.

I don't know if they can be ignored, so I list here what I think deserves a look:

uninitialized variables:
Code: [Select]
winlazutf8.inc(97,21) Hint: Local variable "CmdLineW" of a managed type does not seem to be initialized
winlazutf8.inc(360,23) Hint: Local variable "UTF16Str" of a managed type does not seem to be initialized
winlazutf8.inc(572,17) Hint: Local variable "U1" of a managed type does not seem to be initialized
winlazutf8.inc(574,17) Hint: Local variable "U2" of a managed type does not seem to be initialized
winlazfileutils.inc(207,19) Hint: Local variable "WS" of a managed type does not seem to be initialized
lazfileutils.pas(303,18) Hint: Local variable "File1" of a managed type does not seem to be initialized
lazfileutils.pas(305,18) Hint: Local variable "File2" of a managed type does not seem to be initialized
winfileutil.inc(15,25) Hint: Local variable "WideResult" of a managed type does not seem to be initialized
html2textrender.pas(104,14) Hint: Local variable "s" of a managed type does not seem to be initialized

deprecation warnings (for the case they are deprecated longer than Laz 2.0):
Code: [Select]
laz2_dom.pas(1944,14) Warning: Symbol "BuildList" is deprecated: "Use NodeFilter instead."
laz2_dom.pas(1952,14) Warning: Symbol "BuildList" is deprecated: "Use NodeFilter instead."
lazutf8classes.pas(52,25) Warning: Symbol "TStringListUTF8" is deprecated: "Use TStringList instead"
lazutf8classes.pas(54,30) Warning: Symbol "TStringListUTF8" is deprecated: "Use TStringList instead"
lazutf8classes.pas(59,25) Warning: Symbol "TStringListUTF8" is deprecated: "Use TStringList instead"
lazutf8classes.pas(70,25) Warning: Symbol "TStringListUTF8" is deprecated: "Use TStringList instead"
lazutf8classes.pas(72,30) Warning: Symbol "TStringListUTF8" is deprecated: "Use TStringList instead"
lazutf8classes.pas(77,25) Warning: Symbol "TStringListUTF8" is deprecated: "Use TStringList instead"

Bart

  • Hero Member
  • *****
  • Posts: 4516
    • Bart en Mariska's Webstek
Re: Polishing LazUtils for Laz 2.2.0
« Reply #1 on: October 27, 2021, 09:25:25 am »
Feel free to report this on the bugtracker, but only if you are prepared to also supply a patch for this (preferrably a patch per affected file).

Bart

wp

  • Hero Member
  • *****
  • Posts: 9034
Re: Polishing LazUtils for Laz 2.2.0
« Reply #2 on: October 29, 2021, 01:45:25 pm »
deprecation warnings (for the case they are deprecated longer than Laz 2.0):
Code: [Select]
[...]
lazutf8classes.pas(52,25) Warning: Symbol "TStringListUTF8" is deprecated: "Use TStringList instead"
lazutf8classes.pas(54,30) Warning: Symbol "TStringListUTF8" is deprecated: "Use TStringList instead"
lazutf8classes.pas(59,25) Warning: Symbol "TStringListUTF8" is deprecated: "Use TStringList instead"
lazutf8classes.pas(70,25) Warning: Symbol "TStringListUTF8" is deprecated: "Use TStringList instead"
lazutf8classes.pas(72,30) Warning: Symbol "TStringListUTF8" is deprecated: "Use TStringList instead"
lazutf8classes.pas(77,25) Warning: Symbol "TStringListUTF8" is deprecated: "Use TStringList instead"
The deprecation note for TStringListUTF8 was added by Juha on Jan 14, 2011. At this time, Laz 2.0.x was the most recent release. Since v2.2 has not been released, yet, these warnings are correct.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

Alextp

  • Hero Member
  • *****
  • Posts: 1490
    • UVviewsoft

 

TinyPortal © 2005-2018