Harbour warning level
Posted: Sat Oct 30, 2010 3:52 pm
Hello to everyone
Is there someone can help me to understand why the Harbour compiler generates a warning when compiling the code below?
This is the message IF the source is compiled with warning level 3
As you can see, in one case raises the alert while the other not.
Is there a solution to use without warning with level 3?
Best regards
Is there someone can help me to understand why the Harbour compiler generates a warning when compiling the code below?
Code: Select all
Line 01 MEMVAR _HMG_SYSDATA
Line 02
Line 03 #include "hmg.ch"
Line 04
Line 05 FUNCTION main()
Line 06
Line 07 LOCAL cLocalVar := ""
Line 08
Line 09 cLocalVar := GetCurrentFolder()
Line 10
Line 11 MSGSTOP( cLocalVar )
Line 12
Line 13 RETURN NIL
Line 14
Line 15 FUNCTION Other()
Line 16
Line 17 LOCAL cLocalVar
Line 18
Line 19 cLocalVar := GetCurrentFolder()
Line 20
Line 21 MSGSTOP( cLocalVar )
Line 22
Line 23 RETURN NIL
If I set warning level to zero no message displayed (of course)hbmk2: Processing configuration: D:\HMG\MiniGui\harbour\bin\hbmk.cfg
Harbour 2.0.0 (Rev. 13372)
Copyright (c) 1999-2010, http://www.harbour-project.org/
hbwarntest.prg(15) Warning W0032 Variable 'CLOCALVAR' is assigned but not used in function 'MAIN(7)'
As you can see, in one case raises the alert while the other not.
Is there a solution to use
Code: Select all
LOCAL cVar := "value"Best regards