[patch_done] ZeosLib7 rev1684 warning fix

The alpha/beta tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.

This is a forum that will be removed once the 7.X version goes into stable!!

Moderators: gto, EgonHugeist, olehs

Goaul
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: 01.09.2012, 12:01

[patch_done] ZeosLib7 rev1684 warning fix

Post by Goaul »

With Delphi MX2, got these warnings:

[DCC Warning] ZCollections.pas(77): W1000 Symbol 'MaxListSize' is deprecated
suggested fix:

Code: Select all

-TZInterfaceList = array[0..MaxListSize - 1] of IZInterface;
+TZInterfaceList = array[0..Maxint div 16 - 1] of IZInterface;
[DCC Warning] ZCollections.pas(314): W1000 Symbol 'MaxListSize' is deprecated
[DCC Warning] ZCollections.pas(336): W1000 Symbol 'MaxListSize' is deprecated
suggested fix:

Code: Select all

-if (NewCount < 0) or (NewCount > MaxListSize) then
+if (NewCount < 0) or (NewCount > Maxint div 16) then
fix source:
https://forums.embarcadero.com/thread.j ... eID=404910
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

Goaul,

Thanks for this fix. I propose to introduce an additional define "WITH_MAXLISTSIZE_DEPRECATED" for the Zeos.inc in the Ver230 section for the new code instead of replacing the old.

If i've the time i'll add it or can you attach a patch file?
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
Goaul
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: 01.09.2012, 12:01

Post by Goaul »

EgonHugeist wrote:Goaul,

Thanks for this fix. I propose to introduce an additional define "WITH_MAXLISTSIZE_DEPRECATED" for the Zeos.inc in the Ver230 section for the new code instead of replacing the old.

If i've the time i'll add it or can you attach a patch file?
Here it is, i hope this will speed up things :)

also there are such hints:
[DCC Hint] ZMySqlToken.pas(261): H2077 Value assigned to 'QuoteCount' never used
[DCC Hint] ZMySqlToken.pas(249): H2077 Value assigned to 'QuoteCount' never used

Code: Select all

begin
  Result.Value := FirstChar;
  QuoteCount := 1;
  If FirstChar = '`' then
    Result.TokenType := ttQuotedIdentifier
  Else
    Result.TokenType := ttQuoted;

  QuoteChar := FirstChar;

  LastChar := #0;

  while Stream.Read(ReadChar, SizeOf(Char)) > 0 do
  begin
    if ReadChar = QuoteChar then Inc(QuoteCount);
    if (LastChar = FirstChar) and (ReadChar <> FirstChar) then
    begin
      //if QuoteCount mod 2 = 0 then // only valid for Pascal AnsiQuoted/QuotedStr
You do not have the required permissions to view the files attached to this post.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

Goaul,

both warnings solved. Patch done R1698

Btw 10 moths ago we had over 600 comiler warnings and this for a period of 5 years..
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
Goaul
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: 01.09.2012, 12:01

Post by Goaul »

Yeah saw them on previos revs, great job :)
thnx

on rev1698 missed 1 warning:
[DCC Warning] ZCollections.pas(336): W1000 Symbol 'MaxListSize' is deprecated

also if interested, there are lot of hints: :)

Code: Select all

[DCC Hint] ZSelectSchema.pas(276): H2443 Inline function 'TObjectList.GetItem' has not been expanded because unit 'System.Classes' is not specified in USES list
[DCC Hint] ZSelectSchema.pas(287): H2443 Inline function 'TObjectList.GetItem' has not been expanded because unit 'System.Classes' is not specified in USES list
[DCC Hint] ZSelectSchema.pas(311): H2443 Inline function 'TObjectList.GetItem' has not been expanded because unit 'System.Classes' is not specified in USES list
[DCC Hint] ZSelectSchema.pas(322): H2443 Inline function 'TObjectList.GetItem' has not been expanded because unit 'System.Classes' is not specified in USES list
[DCC Hint] ZSelectSchema.pas(348): H2443 Inline function 'TObjectList.GetItem' has not been expanded because unit 'System.Classes' is not specified in USES list
[DCC Hint] ZSelectSchema.pas(359): H2443 Inline function 'TObjectList.GetItem' has not been expanded because unit 'System.Classes' is not specified in USES list
[DCC Hint] ZSelectSchema.pas(387): H2443 Inline function 'TObjectList.GetItem' has not been expanded because unit 'System.Classes' is not specified in USES list
[DCC Hint] ZSelectSchema.pas(400): H2443 Inline function 'TObjectList.GetItem' has not been expanded because unit 'System.Classes' is not specified in USES list
[DCC Hint] ZSelectSchema.pas(412): H2443 Inline function 'TObjectList.GetItem' has not been expanded because unit 'System.Classes' is not specified in USES list
[DCC Hint] ZSelectSchema.pas(426): H2443 Inline function 'TObjectList.GetItem' has not been expanded because unit 'System.Classes' is not specified in USES list
[DCC Hint] ZSelectSchema.pas(448): H2443 Inline function 'TObjectList.GetItem' has not been expanded because unit 'System.Classes' is not specified in USES list
[DCC Hint] ZSelectSchema.pas(460): H2443 Inline function 'TObjectList.GetItem' has not been expanded because unit 'System.Classes' is not specified in USES list
[DCC Hint] ZSelectSchema.pas(488): H2443 Inline function 'TObjectList.GetItem' has not been expanded because unit 'System.Classes' is not specified in USES list
[DCC Hint] ZSelectSchema.pas(495): H2443 Inline function 'TObjectList.Add' has not been expanded because unit 'System.Classes' is not specified in USES list
[DCC Hint] ZSelectSchema.pas(510): H2443 Inline function 'TObjectList.GetItem' has not been expanded because unit 'System.Classes' is not specified in USES list
[DCC Hint] ZSelectSchema.pas(512): H2443 Inline function 'TObjectList.GetItem' has not been expanded because unit 'System.Classes' is not specified in USES list
[DCC Hint] ZSelectSchema.pas(512): H2443 Inline function 'TObjectList.Add' has not been expanded because unit 'System.Classes' is not specified in USES list
[DCC Hint] ZSelectSchema.pas(521): H2443 Inline function 'TObjectList.Add' has not been expanded because unit 'System.Classes' is not specified in USES list
[DCC Hint] ZSelectSchema.pas(526): H2443 Inline function 'TObjectList.Add' has not been expanded because unit 'System.Classes' is not specified in USES list
[DCC Hint] ZSelectSchema.pas(541): H2443 Inline function 'TObjectList.Add' has not been expanded because unit 'System.Classes' is not specified in USES list
[DCC Hint] ZSelectSchema.pas(551): H2443 Inline function 'TObjectList.Insert' has not been expanded because unit 'System.Classes' is not specified in USES list
[DCC Hint] ZSelectSchema.pas(560): H2443 Inline function 'TObjectList.Remove' has not been expanded because unit 'System.Classes' is not specified in USES list
[DCC Hint] ZSelectSchema.pas(569): H2443 Inline function 'TObjectList.Add' has not been expanded because unit 'System.Classes' is not specified in USES list
[DCC Hint] ZSelectSchema.pas(579): H2443 Inline function 'TObjectList.GetItem' has not been expanded because unit 'System.Classes' is not specified in USES list
[DCC Hint] ZSelectSchema.pas(598): H2443 Inline function 'TObjectList.GetItem' has not been expanded because unit 'System.Classes' is not specified in USES list
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

Goaul,
on rev1698 missed 1 warning:
[DCC Warning] ZCollections.pas(336): W1000 Symbol 'MaxListSize' is deprecated
this warning is gone. If somebody has the time to fix the hints and remaining warnings (component layer) then this would be nice (always think on backward compatibility from D7/FPC to XE2)..
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
Goaul
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: 01.09.2012, 12:01

Post by Goaul »

if u could sow how to fix atleast 1 from those hints, i could try to finish rest and make patch.
merovingio
Fresh Boarder
Fresh Boarder
Posts: 24
Joined: 06.11.2011, 16:46
Location: Siracusa (Siclily)

[DCC Hint] ZConnectionGroup.pas(131): H2164 Variable 'Curren

Post by merovingio »

procedure TZConnectionGroup.Change;
var i:Integer;
// Current: TZConnectionGroupLink; I have only commented.
begin
if Assigned(FOnChange) then
begin
FOnChange(Self);
end;
if FClients <> nil then
for I := 0 to FClients.Count - 1 do
TZConnectionGroupLink(FClients).Change;
end;
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

merovingio,

have you ever worked with TortoiseSVN? I propose you kill some more hints like these. Btw. you can drop such lines if they are no longer used in the procedure body. But not if somebody commented lines in the body out, in this case your patch is right. :) Then you can make a patch file with TortoiseSVN which i can easiely apply. I know cleaned sources looking allways better on compiling.

What do you think? :?:
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
merovingio
Fresh Boarder
Fresh Boarder
Posts: 24
Joined: 06.11.2011, 16:46
Location: Siracusa (Siclily)

Post by merovingio »

Hi!
I never work with TortoiseSVN.
Today I found a little manual (or look on youtube).
Scuse me... for poor english.
merovingio
Fresh Boarder
Fresh Boarder
Posts: 24
Joined: 06.11.2011, 16:46
Location: Siracusa (Siclily)

Post by merovingio »

I need User and Password.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

merovingio,

you need you sourceforge.net username+password. But i must admit i want to have a look to your fixes for a while before granting svn commit privileges. I hope you can understand it. Use Tortois, rightclick to the root of your Zeos-Folder -> TortoiseSVN -> Create Patch. Then attach the file.

Anyway thank you for your constribution.
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
merovingio
Fresh Boarder
Fresh Boarder
Posts: 24
Joined: 06.11.2011, 16:46
Location: Siracusa (Siclily)

I try

Post by merovingio »

I try... thanks!
merovingio
Fresh Boarder
Fresh Boarder
Posts: 24
Joined: 06.11.2011, 16:46
Location: Siracusa (Siclily)

Post by merovingio »

Hi! I have created "delphi Xe2.patch" where are add several files at XE2 projects.
You do not have the required permissions to view the files attached to this post.
Goaul
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: 01.09.2012, 12:01

Post by Goaul »

why u changing paths to files?
Locked