Skip to content

Commit 2f18d4e

Browse files
authored
Merge pull request #1495 from Unidata/git_cleanup.wif
Git Cleanup, Fix for #1486
2 parents d1dd318 + 568c106 commit 2f18d4e

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed
File renamed without changes.
File renamed without changes.

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This file contains a high-level description of this package's evolution. Release
77

88
## 4.7.2 - TBD
99

10+
* [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.
1011
* [Enhancement] [Parallel IO] Added support for parallel functions in MSVC. See [Github #1492](https://github.com/Unidata/netcdf-c/pull/1492) for more information.
1112
* [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.
1213

include/ncdispatch.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,9 @@ extern int NC_inq_recvar(int ncid, int varid, int* nrecdims, int* is_recdim);
231231
#endif
232232

233233
/* Vectors of ones and zeros */
234-
extern const size_t NC_coord_zero[NC_MAX_VAR_DIMS];
235-
extern const size_t NC_coord_one[NC_MAX_VAR_DIMS];
236-
extern const ptrdiff_t NC_stride_one[NC_MAX_VAR_DIMS];
234+
extern size_t NC_coord_zero[NC_MAX_VAR_DIMS];
235+
extern size_t NC_coord_one[NC_MAX_VAR_DIMS];
236+
extern ptrdiff_t NC_stride_one[NC_MAX_VAR_DIMS];
237237

238238
extern int NC_initialized;
239239

libdispatch/ddispatch.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ See LICENSE.txt for license information.
2727
#endif
2828

2929
/* Define vectors of zeros and ones for use with various nc_get_varX function*/
30-
const size_t NC_coord_zero[NC_MAX_VAR_DIMS];
31-
const size_t NC_coord_one[NC_MAX_VAR_DIMS];
32-
const ptrdiff_t NC_stride_one[NC_MAX_VAR_DIMS];
30+
size_t NC_coord_zero[NC_MAX_VAR_DIMS] = {0};
31+
size_t NC_coord_one[NC_MAX_VAR_DIMS] = {1};
32+
ptrdiff_t NC_stride_one[NC_MAX_VAR_DIMS] = {1};
3333

3434
NCRCglobalstate ncrc_globalstate;
3535

@@ -127,7 +127,7 @@ NCDISPATCH_initialize(void)
127127

128128
/* Initialize curl if it is being used */
129129
#if defined(ENABLE_BYTERANGE) || defined(ENABLE_DAP) || defined(ENABLE_DAP4)
130-
{
130+
{
131131
CURLcode cstat = curl_global_init(CURL_GLOBAL_ALL);
132132
if(cstat != CURLE_OK)
133133
status = NC_ECURL;
@@ -146,4 +146,3 @@ NCDISPATCH_finalize(void)
146146
#endif
147147
return status;
148148
}
149-

0 commit comments

Comments
 (0)