The right fix is to delete every nvar in your function (as far as I can
understand), but in general if you remove the assignment it will be nice if
the compiler return an error that you are making a concatenation -
calculation on a non initialized variable. I think that something like that
it will be nice as we will have a lot less runtime errors due to bad coding.


Brgds
Mike Evans

-----Original Message-----
From: harbour-boun...@harbour-project.org
[mailto:harbour-boun...@harbour-project.org] On Behalf Of Lorenzo Fiorini
Sent: Wednesday, January 07, 2009 7:28 PM
To: Harbour Project Main Developer List.
Subject: Re: [Harbour] -w3 optimizazion issue

On Wed, Jan 7, 2009 at 6:05 PM, Mike Evans (Gmail) <makis1...@gmail.com>
wrote:
> I think that in this example the warning is ok. You never used this
> variable. As I can understand a variable is used only if it's a right
> opponent of an expression or a function parameter (at least on first level
> optimization).

Yes, the warning is right but it drives to the wrong "fix".
It's nVar++ the "more" useless code or at least both are useless.

What I mean is that with the local nVar := 0 it gives the warning but
it works while without it it says nothing but it doesn't work.

best regards,
Lorenzo
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to