[futurebasic] FBtoC compiler Warning Question

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : July 2008 : Group Archive : Group : All Groups

From: Walter Lenk <Walter_Lenk@...>
Date: Sat, 26 Jul 2008 11:23:19 -0400
Greetings -

I have a routine for reading a file's data into a container, which 
was derived from a FB example:

LOCAL FN File_To_Container( @CPtr AS PTR, L&)
   IF CPtr.nil& THEN CALL DisposeHandle( CPtr.nil& ) : CPtr.nil& = _nil
   CPtr.nil& = Fn NewHandle(L&)
   LONG IF (CPtr.nil& != _nil)
     CALL HLOCK( CPtr.nil& )
     READ FILE #_InputFile, [CPtr.nil&], L&
     CALL HUNLOCK( CPtr.nil& )
   XELSE
     IF CPtr.nil& THEN CALL DISPOSEHANDLE( CPtr.nil& ) : CPtr.nil& = _nil
   END IF
END FN

This is called as:

FN File_To_Container(gIncomingData$$,FileLgth&)


This routine works well both in FB and FBtoC, but the FBtoC compiler 
throws this warning -
    warning: assignment makes integer from pointer without a cast

    Referring to the line:   CPtr.nil& = Fn NewHandle(L&)


Anyone have suggestions as to how to fix this ?

Best,

Walter

-- 

===========================================
Walter Lenk    Cambridge Ma    617-547-7781
===========================================