Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

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
---------------------------------------

 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690