Skip to content

Commit

Permalink
ckp
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisHeimbigner committed Dec 19, 2024
1 parent 6ef1935 commit 7a4364f
Show file tree
Hide file tree
Showing 12 changed files with 576 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main-cmake.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: NetCDF-C CMake CI - Windows

on: [ pull_request, workflow_dispatch]
on: [push, pull_request, workflow_dispatch]

env:
REMOTETESTDOWN: no
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_tests_osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

name: Run macOS-based netCDF Tests

on: [pull_request,workflow_dispatch]
on: [push,pull_request,workflow_dispatch]

env:
REMOTETESTDOWN: no
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_tests_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

name: Run Ubuntu/Linux netCDF Tests

on: [pull_request,workflow_dispatch]
on: [push,pull_request,workflow_dispatch]

env:
REMOTETESTDOWN: no
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_tests_win_cygwin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Run Cygwin-based tests

on: [pull_request,workflow_dispatch]
on: [push,pull_request,workflow_dispatch]

concurrency:
group: ${{ github.workflow}}-${{ github.head_ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_tests_win_mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
#CPPFLAGS: "-D_BSD_SOURCE"
REMOTETESTDOWN: no

on: [pull_request,workflow_dispatch]
on: [push,pull_request,workflow_dispatch]

concurrency:
group: ${{ github.workflow}}-${{ github.head_ref }}
Expand Down
16 changes: 8 additions & 8 deletions libdispatch/ncjson.c
Original file line number Diff line number Diff line change
Expand Up @@ -844,24 +844,24 @@ listlookup(const struct NCjlist* list, const char* key, size_t* indexp)
}

/* Increase the space available to dict/array.
Even if sz is zero, ensure that the object's list alloc is >= 1.
Even if alloc is zero, ensure that the object's list alloc is >= 1.
@param list pointer to the list
@param sz increase allocation to this size
@param alloc increase allocation to this size
@return NCJ_ERR|NCJ_OK
*/
static int
listsetalloc(struct NCjlist* list, size_t sz)
listsetalloc(struct NCjlist* list, size_t alloc)
{
int stat = NCJ_OK;
NCjson** newcontents = NULL;

if(list == NULL) {stat = NCJTHROW(NCJ_ERR); goto done;}
assert(list->alloc == 0 || list->contents != NULL);
if(sz == 0) sz = 1; /* Guarantee that the list->content is not NULL */
if(list->alloc >= sz) goto done;
/* Since sz > list->alloc > 0, we need to allocate space */
if((newcontents=(NCjson**)calloc(sz,sizeof(NCjson*))) == NULL) {stat = NCJTHROW(NCJ_ERR); goto done;}
list->alloc = sz;
if(alloc == 0) alloc = 1; /* Guarantee that the list->content is not NULL */
if(list->alloc >= alloc) goto done;
/* Since alloc > list->alloc > 0, we need to allocate space */
if((newcontents=(NCjson**)calloc(alloc,sizeof(NCjson*))) == NULL) {stat = NCJTHROW(NCJ_ERR); goto done;}
list->alloc = alloc;
if(list->contents != NULL && list->len > 0) {
/* Preserve any existing contents */
memcpy((void*)newcontents,
Expand Down
4 changes: 2 additions & 2 deletions nczarr_test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@ tmp_*.nc tmp_*.zarr tst_quantize*.zarr rcmiscdir ref_power_901_constants.file
#results.file results.s3 results.zip

EXTRA_DIST += CMakeLists.txt test_nczarr.sh run_corrupt.sh run_external.sh run_interop.sh run_nczarr_fill.sh run_chunkcases.sh run_fillonlyz.sh run_filter.sh run_nccopyz.sh run_nczarr_fill.sh run_nczfilter.sh run_newformat.sh run_perf_chunks1.sh run_unlim_io.sh test_nczarr.sh run_ut_map.sh run_ut_mapapi.sh run_ncgen4.sh run_nan.sh run_quantize.sh run_purezarr.sh run_misc.sh run_jsonconvention.sh run_strings.sh run_scalar.sh run_nulls.sh run_notzarr.sh run_ut_misc.sh run_unknown.sh run_specific_filters.sh run_filter_vlen.sh run_filterinstall.sh test_unlim_vars.c test_h5_endians.c test_put_vars_two_unlim_dim.c test_put_vars_two_unlim_dim.c run_mud.sh run_nccopy5.sh run_filter_misc.sh \
timer_utils.c timer_utils.h bm_utils.c test_utils.c bm_utils.h bm_timer.h
timer_utils.c timer_utils.h bm_utils.c test_utils.c bm_utils.h bm_timer.h

EXTRA_DIST += ref_noshape.file.zip ref_power_901_constants.cdl ref_power_901_constants_orig.zip ref_avail1.cdl ref_avail1.dmp ref_avail1.txt ref_byte.cdl ref_byte_fill_value_null.cdl ref_byte_fill_value_null.zarr.zip ref_byte.zarr.zip ref_fillonly.cdl ref_groups.h5 ref_misc1.cdl ref_misc1.dmp ref_ndims.cdl ref_ndims.dmp ref_newformatpure.cdl ref_notzarr.tar.gz ref_nulls.cdl ref_oldformat.cdl ref_oldformat.zip ref_perdimspecs.cdl ref_purezarr_base.cdl ref_quotes.cdl ref_quotes_orig.zip ref_rem.cdl ref_rem.dmp ref_scalar.cdl ref_skip.cdl ref_skip.txt ref_skipw.cdl ref_string.cdl ref_t_meta_dim1.cdl ref_t_meta_var1.cdl ref_ut_json_build.txt ref_ut_json_parse.txt ref_ut_mapapi_create.cdl ref_ut_mapapi_data.cdl ref_ut_mapapi_meta.cdl ref_ut_mapapi_search.txt ref_ut_map_create.cdl ref_ut_map_readmeta2.txt ref_ut_map_readmeta.txt ref_ut_map_search.txt ref_ut_map_writedata.cdl ref_ut_map_writemeta2.cdl ref_ut_map_writemeta.cdl ref_ut_proj.txt ref_ut_testmap_create.cdl ref_whole.cdl ref_whole.txt ref_zarr_test_data.cdl.gz ref_bzip2.cdl ref_filtered.cdl ref_purezarr.cdl ref_jsonconvention.cdl ref_groups_regular.cdl ref_zarr_test_data_2d.cdl.gz ref_misc2.cdl ref_string_zarr.baseline ref_string_nczarr.baseline ref_nulls_zarr.baseline ref_nulls_nczarr.baseline ref_any.cdl ref_xarray.cdl ref_jsonconvention.zmap ref_nczarr2zarr.cdl ref_multi.cdl ref_tst_mud4.cdl ref_tst_mud4-bc.cdl ref_tst_mud4_chars.cdl ref_tst_nans.dmp
EXTRA_DIST += ref_noshape.file.zip ref_power_901_constants.cdl ref_power_901_constants_orig.zip ref_avail1.cdl ref_avail1.dmp ref_avail1.txt ref_byte.cdl ref_byte_fill_value_null.cdl ref_byte_fill_value_null.zarr.zip ref_byte.zarr.zip ref_fillonly.cdl ref_groups.h5 ref_misc1.cdl ref_misc1.dmp ref_ndims.cdl ref_ndims.dmp ref_newformatpure.cdl ref_notzarr.tar.gz ref_nulls.cdl ref_oldformat.cdl ref_oldformat.zip ref_perdimspecs.cdl ref_purezarr_base.cdl ref_quotes.cdl ref_quotes_orig.zip ref_rem.cdl ref_rem.dmp ref_scalar.cdl ref_skip.cdl ref_skip.txt ref_skipw.cdl ref_string.cdl ref_t_meta_dim1.cdl ref_t_meta_var1.cdl ref_ut_json_build.txt ref_ut_json_parse.txt ref_ut_mapapi_create.cdl ref_ut_mapapi_data.cdl ref_ut_mapapi_meta.cdl ref_ut_mapapi_search.txt ref_ut_map_create.cdl ref_ut_map_readmeta2.txt ref_ut_map_readmeta.txt ref_ut_map_search.txt ref_ut_map_writedata.cdl ref_ut_map_writemeta2.cdl ref_ut_map_writemeta.cdl ref_ut_proj.txt ref_ut_testmap_create.cdl ref_whole.cdl ref_whole.txt ref_zarr_test_data.cdl.gz ref_bzip2.cdl ref_filtered.cdl ref_purezarr.cdl ref_jsonconvention.cdl ref_groups_regular.cdl ref_zarr_test_data_2d.cdl.gz ref_misc2.cdl ref_string_zarr.baseline ref_string_nczarr.baseline ref_nulls_zarr.baseline ref_nulls_nczarr.baseline ref_any.cdl ref_xarray.cdl ref_jsonconvention.zmap ref_nczarr2zarr.cdl ref_multi.cdl ref_tst_mud4.cdl ref_tst_mud4-bc.cdl ref_tst_mud4_chars.cdl ref_tst_nans.dmp ref_cmip6.zmap

DISTCLEANFILES += findplugin.sh ${BUILT_SOURCES}

Expand Down
Loading

0 comments on commit 7a4364f

Please sign in to comment.