On Wed, Jan 7, 2009 at 7:29 PM, Mike Evans (Gmail) wrote:
> 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
Developer List.
Subject: Re: [Harbour] -w3 optimizazion issue
On Wed, Jan 7, 2009 at 6:05 PM, Mike Evans (Gmail)
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 e
On Wed, Jan 7, 2009 at 6:05 PM, Mike Evans (Gmail) 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
From: harbour-boun...@harbour-project.org
[mailto:harbour-boun...@harbour-project.org] On Behalf Of Lorenzo Fiorini
Sent: Wednesday, January 07, 2009 7:05 PM
To: Harbour Project Main Developer List.
Subject: [Harbour] -w3 optimizazion issue
function main
local nVar := 0
nVar++
return nil
In the code
function main
local nVar := 0
nVar++
return nil
In the code above harbour returns:
testopt.prg:2:MAIN warning: W0032 Variable 'NVAR' is assigned but not
used in function '2:MAIN'
if I "fix" the warning removing ":= 0" with:
function main
local nVar
nVar++
return nil
I get no more messages but