On Mon, 02 Jun 2008, Enrico Maria Giordano wrote:

Hi Enrico,

> Please look at the following sample:
> FUNCTION MAIN()
>    LOCAL bTest := { | Param | MyFunc() }
>    RETURN NIL
> STATIC FUNCTION MYFUNC()
>    RETURN NIL
> The compiler shows this warning if /w2 or /w3 are used:
> Warning W0004  Codeblock parameter: 'PARAM' declared but not used in 
> function: 'MAIN'
> Is it expected?

Yes, it's expected.
   HB_SYMBOL_UNUSED( Param )
disables the warning without any RT overhead.

> I think it is common to not reference all the codeblock parameters.

Probably yes though in some cases it may be usable and will help
to locate wrong code. To make all people happy we will have to add
compiler switch to disable this warning for codeblocks only, f.e.:
      -kB      turn off unused codeblock parameter warnings

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

Reply via email to