diff --git a/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md similarity index 100% rename from CODE_OF_CONDUCT.md rename to .github/CODE_OF_CONDUCT.md diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 0ec05a00b3..7b9e8a032c 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -7,6 +7,7 @@ This file contains a high-level description of this package's evolution. Release ## 4.7.2 - TBD +* [Bug Fix][Enhancement] Corrected an issue where protected memory was being written to with some pointer slight-of-hand. This has been in the code for a while, but appears to be caught by the compiler on OSX, under circumstances yet to be completely nailed down. See [GitHub #1486](https://github.com/Unidata/netcdf-c/issues/1486) for more information. * [Enhancement] [Parallel IO] Added support for parallel functions in MSVC. See [Github #1492](https://github.com/Unidata/netcdf-c/pull/1492) for more information. * [Enhancement] Added a function for changing the ncid of an open file. This function should only be used if you know what you are doing, and is meant to be used primarily with PIO integration. See [GitHub #1483](https://github.com/Unidata/netcdf-c/pull/1483) and [GitHub #1487](https://github.com/Unidata/netcdf-c/pull/1487) for more information. diff --git a/include/ncdispatch.h b/include/ncdispatch.h index 9e064aa507..a87d8e1732 100644 --- a/include/ncdispatch.h +++ b/include/ncdispatch.h @@ -231,9 +231,9 @@ extern int NC_inq_recvar(int ncid, int varid, int* nrecdims, int* is_recdim); #endif /* Vectors of ones and zeros */ -extern const size_t NC_coord_zero[NC_MAX_VAR_DIMS]; -extern const size_t NC_coord_one[NC_MAX_VAR_DIMS]; -extern const ptrdiff_t NC_stride_one[NC_MAX_VAR_DIMS]; +extern size_t NC_coord_zero[NC_MAX_VAR_DIMS]; +extern size_t NC_coord_one[NC_MAX_VAR_DIMS]; +extern ptrdiff_t NC_stride_one[NC_MAX_VAR_DIMS]; extern int NC_initialized; diff --git a/libdispatch/ddispatch.c b/libdispatch/ddispatch.c index a9f75fbc92..21837a4367 100644 --- a/libdispatch/ddispatch.c +++ b/libdispatch/ddispatch.c @@ -27,9 +27,9 @@ See LICENSE.txt for license information. #endif /* Define vectors of zeros and ones for use with various nc_get_varX function*/ -const size_t NC_coord_zero[NC_MAX_VAR_DIMS]; -const size_t NC_coord_one[NC_MAX_VAR_DIMS]; -const ptrdiff_t NC_stride_one[NC_MAX_VAR_DIMS]; +size_t NC_coord_zero[NC_MAX_VAR_DIMS] = {0}; +size_t NC_coord_one[NC_MAX_VAR_DIMS] = {1}; +ptrdiff_t NC_stride_one[NC_MAX_VAR_DIMS] = {1}; NCRCglobalstate ncrc_globalstate; @@ -127,7 +127,7 @@ NCDISPATCH_initialize(void) /* Initialize curl if it is being used */ #if defined(ENABLE_BYTERANGE) || defined(ENABLE_DAP) || defined(ENABLE_DAP4) - { + { CURLcode cstat = curl_global_init(CURL_GLOBAL_ALL); if(cstat != CURLE_OK) status = NC_ECURL; @@ -146,4 +146,3 @@ NCDISPATCH_finalize(void) #endif return status; } -