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

[netCDF #RAQ-461561]: NC_FILL_STRING definition suggestion



Charlie,

> I suggest that instead of the netcdf.h definition
> 
> #define NC_FILL_STRING  ""
> 
> instead the following be used
> 
> #define NC_FILL_STRING  (char *)""
> 
> This would be more consistent with the other fill value definitions,
> and would prevent clang compiler warning like this
> 
> ../src/nco/nco_mss_val.c:39:32: warning: assigning to 'nco_string' (aka
> 'char *') from 'const char [1]' discards
> qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
> 
> It does not cause problems on the other compilers I have checked.
> However, my checks were not thorough and may I overlooked a
> downside consequence.

Great suggestion, thanks!  It's committed on GitHub.

--Russ

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



Ticket Details
===================
Ticket ID: RAQ-461561
Department: Support netCDF
Priority: Normal
Status: Closed