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.

ANSI C complaints under MacOS X

Hi group-

I am linking programs (GMT) with the netcdf library (3.5.0) under MacOS X.
The MacOS X cc compiler (based on gcc) gives warnings for
lines 190 and 193 in netcdf.h, saying

ANSI C forbids const or volatile functions

The offending lines are:

EXTERNL const char *
nc_inq_libvers(void);

EXTERNL const char *
nc_strerror(int ncerr);

I get no such warnings under Linux.  While they are just warnings and cause no
problems it is annoying to see them and if the message about ANSI C is true
then shouldn't netcdf.h take the const declarations out?

Cheers,

---------------------------------------
Paul Wessel, Professor and Chair
Dept. of Geology & Geophysics
SOEST, University of Hawaii at Manoa
1680 East-West Road, Honolulu, HI 96822

phone/fax: (808) 956-4778/5154
email:     pwessel@xxxxxxxxxx
web:       www.soest.hawaii.edu/wessel
---------------------------------------

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