Forum > LazUtils

Polishing LazUtils for Laz 2.2.0

(1/1)

Muso:
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: ---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

--- End code ---

deprecation warnings (for the case they are deprecated longer than Laz 2.0):

--- Code: ---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"

--- End code ---

Bart:
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:

--- Quote from: Muso on October 27, 2021, 03:16:32 am ---deprecation warnings (for the case they are deprecated longer than Laz 2.0):

--- Code: ---[...]
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"

--- End code ---

--- End quote ---
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.

AlexTP:
Made the PullReq https://gitlab.com/freepascal.org/lazarus/lazarus/-/merge_requests/35

Navigation

[0] Message Index

Go to full version