On Mon, 21 Sep 2009, Mindaugas Kavaliauskas wrote:

Hi,

> code:
> ----------------------------
> PROC main()
> #pragma begindump
> #include "hbthread.h"
> static HB_CRITICAL_NEW( s_mtx );
> void somefunc( void )
> {
>    HB_CRITICAL_INIT( s_mtx );
> }
> #pragma enddump
> ----------------------------
> causes warning on BCC:
> Warning W8075 test.prg 7: Suspicious pointer conversion in function somefunc
> The same warning is generated for HB_CRITICAL_LOCK( s_mtx ) and 
> HB_CRITICAL_UNLOCK( s_mtx ).

HB_CRITICAL_NEW() creates structure which does not need any initialization
and can be used with hb_threadEnterCriticalSection()/
hb_threadLeaveCriticalSection() functions.
HB_CRITICAL_INIT()/HB_CRITICAL_LOCK() and HB_CRITICAL_UNLOCK() are not
public macros. Please do not use it.
To reduce confusions probably I'll hide them for non HVM core code in
the future.

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

Reply via email to