Lazarus

Programming => Packages and Libraries => LazUtils => Topic started by: Muso on October 27, 2021, 03:16:32 am

Title: Polishing LazUtils for Laz 2.2.0
Post by: Muso 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"
Title: Re: Polishing LazUtils for Laz 2.2.0
Post by: Bart 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
Title: Re: Polishing LazUtils for Laz 2.2.0
Post by: wp 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.
Title: Re: Polishing LazUtils for Laz 2.2.0
Post by: AlexTP on October 29, 2021, 02:10:28 pm
Made the PullReq https://gitlab.com/freepascal.org/lazarus/lazarus/-/merge_requests/35
TinyPortal © 2005-2018