Possible problems in NAPI.C
Ray Osborn
ROsborn at anl.gov
Tue Feb 22 16:06:15 GMT 2000
on 2000/02/22 1:30 AM, Mark Koennecke at Mark.Koennecke at psi.ch wrote:
>
> I tend to agree with Ray on this. That was the reason why we fixed the
> stuff in the NAPI code at all. It would have been much easier to fix
> the recent integer problem by requiring all parameters to be int32. At
> the time we decided against that in order to prevent user confusion.
> Also, with the code being as it is now, it does not matter at all what
> kind of int you pass in.
>
> I feel that gcc is just picky and may even be mistaken about this
> warning. I recently ported SICS to linux in half a day and I believe
> I created a few NeXus files from it as well. I'll check if those look
> OK. I really do wonder if our code needs to compile on all those
> compilers out there without warning.
>
>
I have seen compiler warning messages on both Linux, using the Absoft Pro C
compiler (I don't think it's just gcc), and Macs, using Metrowerks
CodeWarrior. Are there any times where casting the 4-byte int array to
int32 in the SDwritedata call will generate an error message? I know that
such casts are dangerous when the integer size is different and redundant
when they are the same. Since this is the latter, I vote for redundancy
unless there are other side effects I don't know about.
Regards,
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