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

[netCDF #PUM-976132]: Compile problems with NetCDF 3.6.3 and gcc's



Sean,

This is all kind of academic since I've now changed the code to use strlcat(),
and
it seems to work.  I still have to check that it now passes gcc
-D_FORTIFY_DOURCE=2,
as I suspect there may be more issues after this one.

In answer to your question, yes I really have to advance sp.  The purpose of
the
decodify function is to change netCDF names with special characters in them,
such
as "relative humidity (%)" to strings that can be used for variable names in
generated C and Fortran code, such as
"relative_SPACE_humidity_SPACE__LEFTPAREN__PERCENT__RIGHTPAREN_", and for this
purpose, it's necessary to have a cursor (cp) moving along in the name as
another cursor (sp) is moving along in the newname.  There may be a better way
to do it, but I think the change to using strlcat() improved things.

--Russ

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: PUM-976132
Department: Support netCDF
Priority: Normal
Status: Closed