Hi Lorenzo, 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).
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:05 PM To: Harbour Project Main Developer List. Subject: [Harbour] -w3 optimizazion issue 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 I the code stops with a RT error at line 3. Is there any way to detect such situation? 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