Possible problems in NAPI.C

Ray Osborn ROsborn at anl.gov
Mon Feb 21 16:03:32 GMT 2000


Following the recent postings of int32-corrected versions of NAPI.C, I tried
to compile it on our Linux cluster using Absoft Pro Fortran (and C).  I've
been getting the following warnings:

napi.c: In function `nxiputslab':
napi.c:1136: warning: passing arg 2 of `SDwritedata' from incompatible
pointer type
napi.c:1136: warning: passing arg 4 of `SDwritedata' from incompatible
pointer type

This refers to the following lines :

       /* write directly */
       iRet = SDwritedata (pFile->iCurrentSDS,iStart,
              iStride, iSize, data);

which are invoked if sizeof(int) is 4 i.e. when a local copy is NOT made.

I'm guessing that the compiler is worried that there are two calls to
SDwritedata in this function, one passing int32 arrays and the other int's,
and hasn't worked out that they must be the same in this section of code.

Since I would prefer not to have any compiler warnings on our code, do you
have any recommendations for a fix?  Should we typecast the iStart and iSize
arrays even though it's unnecessary, or should we just copy all the arrays
whether the int size if 4 or not?

Any opinions?

Ray
-- 
Dr Ray Osborn                Tel: +1 (630) 252-9011
Materials Science Division   Fax: +1 (630) 252-7777
Argonne National Laboratory  E-mail: ROsborn at anl.gov
Argonne, IL 60439-4845

 




More information about the NeXus-developers mailing list