#1 2026-04-16 07:44:31

koraycayiroglu
Member
Registered: 2017-02-03
Posts: 87

Can we get rid of this warning inside zeos unit?

Hi ab,

Delphi raises a "Combining signed and unsigned types" warning when using mormot.db.sql.zeos unit for line 393. I know it's nothing but we configured our compiler to not build applications if there is a warning.

I fixed my own copy. Here how i did it.

var
  BrakedPos, BrakedPosEnd: integer;
begin
  // return e.g. mysql://192.168.2.60:3306/world?username=root;password=dev
  // make syntax like "ADO[ORACLE]"/"ADO[MSSQL]:"/"ADO[JET]" etc... possible
  BrakedPos := PosExChar('[', aServerName);
  BrakedPosEnd := PosExChar(']', aServerName);

  if (BrakedPos > 0) and
     ((aServerName[Length(aServerName)] = ']') or
      (aServerName[Length(aServerName) - 1] = ']')) then
  begin
    fServerName := Copy(aServerName, 1, BrakedPos - 1);
    fDbmsName := Copy(aServerName, BrakedPos + 1, BrakedPosEnd - 1 - BrakedPos);
  end

but i don't want to fix it every time i update my mormot2 for reasons smile. I can change it and create a pull request but it's just a single line.

So, can you fixed it please?

Offline

#2 2026-04-16 08:32:56

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,440
Website

Re: Can we get rid of this warning inside zeos unit?

Offline

#3 2026-04-16 09:15:03

koraycayiroglu
Member
Registered: 2017-02-03
Posts: 87

Re: Can we get rid of this warning inside zeos unit?

Yes, thank you ab.

Offline

Board footer

Powered by FluxBB