NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: [netcdfgroup] please try out the netcdf daily snapshot for opendap, hdf4-reading, hdf5-reading, szip compression, etc.

On 10/18/09 5:14 AM, Ed Hartnett said:

>Now would be a great time for our dedicated user community to download
>the daily snapshot, let us know that it builds cleanly

Ed,

I only really use NetCDF as a dependency of another library.  So my
testing has been limited to compilation issues.  Many that I reported
previously have been fixed (some not).  Here's what I still see building
on Mac OS X 10.6 with clang:

export CC=/Developer/usr/bin/clang
export CXX=/Developer/usr/bin/llvm-gcc-4.2
export CFLAGS="-Wall -Wextra -arch x86_64"
export CXXFLAGS="-Wall -Wextra -arch x86_64"


(1) Easy to fix:

libtool: compile:  /Developer/usr/bin/clang -DHAVE_CONFIG_H -I. -I.. -
I../fortran -arch x86_64 -MT
utf8proc.lo -MD -MP -MF .deps/utf8proc.Tpo -c utf8proc.c -o utf8proc.o
warning: implicitly declaring C library function 'strlen' with type
'unsigned long (char const *)'
note: please include the header <string.h> or explicitly provide a
declaration for 'strlen'

(2) Lots of these:

cdfdata.c:321:2: warning: expression result unused [-Wunused-value]
        bbClear(memory);
        ^~~~~~~~~~~~~~~
./bytebuffer.h:61:42: note: instantiated from:
#define bbClear(bb) ((bb)?(bb)->length=0:0U)
                                         ^~
I've searched everywhere, and the result of bbClear is never used, so
the macro could be changed to avoid the warning, for example:

#define bbClear(bb) (void)((bb)?(bb)->length=0:0U)

(3) Trickier:

ncvalues.cpp: In member function 'virtual char NcValues_ncbyte::as_char
(long int) const':
ncvalues.cpp:81: warning: comparison is always false due to limited
range of data type

(4)

Not a compilation issue, but I couldn't hep but notice that the source
is riddled with the use of sprintf().  This function really should never
be used, see for example:

<http://developer.apple.com/mac/library/documentation/Security/
Conceptual/SecureCodingGuide/Articles/BufferOverflows.html#//apple_ref/
doc/uid/TP40002577>

Random example:

int field_exist(const char* file, const char *name)
{
  char msg[512];
  ...
  sprintf(msg, "field_exist: in opening file %s", file);

If the file's path is longer than ~500 chars?  :(

hth,

--
____________________________________________________________
Sean McBride, B. Eng                 sean@xxxxxxxxxxxxxxxxxx
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada




  • 2009 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: