Page 1 of 1

Proxy compilation warnings

Posted: 27.01.2021, 20:50
by aehimself
I just refreshed my Zeos repo and I am greeted with the following:

[dcc64 Hint] ZDbcProxy.pas(105): H2269 Overriding virtual method 'TZDbcProxyConnection.AfterConstruction' has lower visibility (protected) than base class 'TZAbstractSingleTxnConnection' (public)
[dcc64 Hint] ZDbcProxyResultSet.pas(1532): H2077 Value assigned to 'TZDbcProxyResultSet.MoveAbsolute' never used
[dcc64 Warning] ZDbcBeginnerStatement.pas(1563): W1057 Implicit string cast from 'RawByteString' to 'string'
[dcc64 Hint] ZDbcProxy.pas(333): H2164 Variable 'PlainDrv' is declared but never used in 'TZDbcProxyConnection.AfterConstruction'
[dcc64 Warning] ZDbcProxy.pas(366): W1058 Implicit string cast with potential data loss from 'string' to 'RawByteString'
[dcc64 Warning] ZDbcProxy.pas(371): W1057 Implicit string cast from 'RawByteString' to 'string'
[dcc64 Warning] ZDbcProxy.pas(541): W1058 Implicit string cast with potential data loss from 'string' to 'RawByteString'
[dcc64 Warning] ZDbcProxy.pas(546): W1057 Implicit string cast from 'RawByteString' to 'string'

@Jan, do you want me to fix these or you are already on it?

Re: Proxy compilation warnings

Posted: 28.01.2021, 08:33
by marsupilami
And here I thought I fixed the visibility thing already... I am not working on fixing those warnings yet. It will take another couple of days until I get to do that because the corresponding server needs more work done more urgently. If you want to fix these warnings, I will be happy to apply the patch. :)

Re: Proxy compilation warnings

Posted: 28.01.2021, 13:49
by aehimself
These are easy to be fixed. Leave them to me, I'll take care of 'em before I look into the failing tests this afternoon.

Re: Proxy compilation warnings

Posted: 28.01.2021, 19:50
by aehimself
Done, it got appended to the currently open pull request.
This way it's fine in Delphi, I hope it will be warning-free in FPC too.

I think it's time for me to download Lazarus so I can test-compile at least :)

Re: Proxy compilation warnings

Posted: 29.01.2021, 05:45
by EgonHugeist
Thoughts:

It would be nice to omit the ZDBcBeginnerStatement unit. It just re implements the old 7.2 logic. Jan did use it because he oftenly is switching between 7.2 and Zeos 8. It's time to remove the unit. The should not be part of Zeos8.
I've added a TZBeginnerPreparedStatement class in ZDbcStatement.pas instead. Upgrading the proxy-statment won't be soo compilcated.

Re: Proxy compilation warnings

Posted: 29.01.2021, 09:49
by marsupilami
aehimself wrote: 28.01.2021, 19:50 Done, it got appended to the currently open pull request.
This way it's fine in Delphi, I hope it will be warning-free in FPC too.

I think it's time for me to download Lazarus so I can test-compile at least :)
Thank you :)
EgonHugeist wrote: 29.01.2021, 05:45 I've added a TZBeginnerPreparedStatement class in ZDbcStatement.pas instead. Upgrading the proxy-statment won't be soo compilcated.
I will set up some tests. Then we can change to the new TZBeginnerPreparedStatement. With the tests we have a chance to see if everything is still working after the changes.