Open schwehr opened 5 months ago
Unfortunately, this will require significant rework to fix.
NCvar1io() will pass the value pointer to hdf_xdr_NCv1data(), then hdf_xdr_NCvdata(). That function can perform both encode and decode operations on the passed-in void pointer, so at some point there is going to be a const warning. Personally, I'd rather have a write buffer flagged as const until we have to strip it out vs. remove const entirely to make the compiler happy.
In HDF5, we use compiler-specific warning suppression to quiet those architectural "kinda const" situations. We'll probably bring those over to HDF4 in the next release, but we should also rework the stripped-down XDR layer that remains to have explicit encode and decode calls, which would go a long way towards proper const usage.
This is with llvm from it's main branch about 2-3 weeks ago. From hdf4 at a6eec0d868e5935606be3cfd4332c025a6b1e9e5
I'm still seeing one compiler warning that is probably pretty easy to fix.