Re: Result Might be Undefined Warning IdGlobalProtocols.pas fixed

Giganews Newsgroups
Subject: Re: Result Might be Undefined Warning IdGlobalProtocols.pas fixed
Posted by:  Remy Lebeau (TeamB) (no.spam@no.spam.com)
Date: Sun, 6 Feb 2005

"Len Umina" <umi…@speakeasy.net> wrote in message
news:21A4F77CB7BEE240umi…@speakeasy.net...

>  {$IFDEF WINDOWS}

That line is wrong.  It needs to be this instead:

    {$IFDEF MSWINDOWS}

> Result := -1; //UMINA

The function returns a TDateTime.  Don't use -1 for TDateTime values.  Use 0
instead.  Especially since GetGMTDateByName() is only used by TIdFSP.Put(),
which looks for 0 anyway, not -1.

>  {$IFDEF WINDOWS}

That line is wrong.  It needs to be as above.

Gambit

Replies

None

In response to

Result Might be Undefined Warning IdGlobalProtocols.pas fixed posted by Len Umina on Sun, 6 Feb 2005