diff --git a/Jenkinsfile b/Jenkinsfile index d5894e8bbd..124bae502d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -389,7 +389,7 @@ node { builders['macOS-release'] = get_macos_pipeline('Release') builders['macOS-debug'] = get_macos_pipeline('Debug') - builders['Windows10'] = get_win10_pipeline() + // builders['Windows10'] = get_win10_pipeline() //builders['Debian10/Meson'] = get_meson_debian_pipeline() diff --git a/conanfile_macos.txt b/conanfile_macos.txt index 8aeca387ac..2b2b4442df 100644 --- a/conanfile_macos.txt +++ b/conanfile_macos.txt @@ -1,7 +1,7 @@ [requires] boost/1.69.0 hdf5/1.10.6 -zlib/1.2.8 +zlib/1.2.11 bzip2/1.0.8 [generators] diff --git a/src/h5cpp/node/dataset.cpp b/src/h5cpp/node/dataset.cpp index 568bdc4f57..23c730ca91 100644 --- a/src/h5cpp/node/dataset.cpp +++ b/src/h5cpp/node/dataset.cpp @@ -76,7 +76,7 @@ Node Dataset::create_dataset(const Group &base, // implementation of public member functions //============================================================================= Dataset::Dataset(const Node &node): - Node(node) + Node(node) { if(node.type()!=Type::Dataset) { @@ -242,10 +242,6 @@ void resize_by(const Dataset &dataset,size_t dimension_index,ssize_t delta) throw std::runtime_error(ss.str()); } -#ifdef __GNUC__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wsign-compare" -#endif if((delta<0) && (current_dims[dimension_index] < static_cast(std::abs(delta)))) { std::stringstream ss; @@ -255,11 +251,10 @@ void resize_by(const Dataset &dataset,size_t dimension_index,ssize_t delta) <<" would be negative"; throw std::runtime_error(ss.str()); } -#ifdef __GNUC__ -#pragma GCC diagnostic pop -#endif - - current_dims[dimension_index] += signed2unsigned(delta); + if (delta < 0) + current_dims[dimension_index] -= signed2unsigned(-delta); + else + current_dims[dimension_index] += signed2unsigned(delta); dataset.resize(current_dims); } diff --git a/src/h5cpp/property/dataset_transfer.cpp b/src/h5cpp/property/dataset_transfer.cpp index 2cafec873d..3858726898 100644 --- a/src/h5cpp/property/dataset_transfer.cpp +++ b/src/h5cpp/property/dataset_transfer.cpp @@ -50,10 +50,6 @@ DatasetTransferList::DatasetTransferList(ObjectHandle &&handle, bool do_check): #ifdef WITH_MPI -#ifdef __GNUC__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wreturn-type" -#endif std::ostream &operator<<(std::ostream &stream,const MPITransferMode &mode) { switch(mode) @@ -63,16 +59,10 @@ std::ostream &operator<<(std::ostream &stream,const MPITransferMode &mode) case MPITransferMode::Collective: return stream<<"COLLECTIVE"; } + return stream; } -#ifdef __GNUC__ -#pragma GCC diagnostic pop -#endif -#ifdef __GNUC__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wreturn-type" -#endif std::ostream &operator<<(std::ostream &stream,const MPIChunkOption &option) { switch(option) @@ -82,11 +72,8 @@ std::ostream &operator<<(std::ostream &stream,const MPIChunkOption &option) case MPIChunkOption::MultiChunk: return stream<<"MULTI_CHUNK"; } + return stream; } -#ifdef __GNUC__ -#pragma GCC diagnostic pop -#endif - void DatasetTransferList::mpi_transfer_mode(MPITransferMode mode) const { diff --git a/test/node/dataset_extent_test.cpp b/test/node/dataset_extent_test.cpp index 54630b0b4b..a29851adc1 100644 --- a/test/node/dataset_extent_test.cpp +++ b/test/node/dataset_extent_test.cpp @@ -77,6 +77,12 @@ SCENARIO("testing the extent of a dataset") { REQUIRE_NOTHROW(dataset.extent(0, 123)); THEN("the actual dimensions reads 123") { REQUIRE(current_dimension(dataset) == 123ul); + AND_WHEN("shrinking the elements for a single dimension using extent()") { + REQUIRE_NOTHROW(dataset.extent(0, -3)); + THEN("the actual dimensions reads 120") { + REQUIRE(current_dimension(dataset) == 120ul); + } + } } }