[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 970708: NC_SHORT error on WIN32 or NT?



> Glenn,
>
> thank you for your immidiate answer.
> I've done all above you said.
> I recompiled the lib with source version 3.3.1 and the win32\maks.
> Following errors and warnings occured:
>
> 1. The msc4.2 didn't understand the compiler option "/FD"
>
> 2. Folling warnings appeared:
>
> >     cl /nologo /W3 /MT          /O2 /D "NDEBUG" /D "DLL_NETCDF" /D
"DLL_EXPORT" /c ncx.c
> >ncx.c
> >ncx.c(232) : warning C4244: '=' : conversion from 'short ' to 'char ',
possible loss of data
> >ncx.c(243) : warning C4244: '=' : conversion from 'short ' to 'unsigned char
', possible loss of data
> >ncx.c(398) : warning C4244: 'initializing' : conversion from 'const float '
to 'short ', possible loss of data
> >ncx.c(408) : warning C4244: 'initializing' : conversion from 'const double '
to 'short ', possible loss of data
> >ncx.c(545) : warning C4244: '=' : conversion from 'int ' to 'float ',
possible loss of data
>
> This seemed much alike you guessed?

These are okay. In the vicinity of the conversion,
there is a runtime check to see if the value is too big to fit, and NC_ERANGE
will be returned at if there is a problem. The warnings can be eliminated by
appropriate casts.

> 3. t_nc succeeded with no errors
>
> 4. nc_test (also from 3.3.1) closed with the message:
> "Total number of failures: 95561"

Hmm, Can you send the complete output of nc_test?
What about nctest?
Does your code still have the short problem when linked against this version?

-glenn