From bc3a7f013b6f1c24f5d1706cd887bf92341bbd52 Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Tue, 25 Oct 2016 22:14:16 -0500 Subject: Description: - In the test for HDFFV-9758, a pragma pack(1) caused failure on Emu because Sparc cannot access misaligned data. Changed it to pack() to do the default alignment. - Added DOXYGEN_SHOULD_SKIP_THIS blocks to private elements to prevent warnings from doxygen. Platforms tested: SunOS 5.11 (emu) Linux/32 2.6 (jam) --- c++/src/H5IdComponent.cpp | 2 ++ c++/src/H5Library.cpp | 2 ++ c++/src/H5Library.h | 2 -- hl/c++/test/ptableTest.cpp | 8 ++++++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/c++/src/H5IdComponent.cpp b/c++/src/H5IdComponent.cpp index d869b07..d71c953 100644 --- a/c++/src/H5IdComponent.cpp +++ b/c++/src/H5IdComponent.cpp @@ -24,6 +24,7 @@ namespace H5 { +#ifndef DOXYGEN_SHOULD_SKIP_THIS // This flag indicates whether H5Library::initH5cpp has been called to register // the terminating functions with atexit() bool IdComponent::H5cppinit = false; @@ -32,6 +33,7 @@ bool IdComponent::H5cppinit = false; // Subclasses that have global constants use it. This is a temporary // work-around in 1.8.16. It will be removed after HDFFV-9540 is fixed. bool IdComponent::H5dontAtexit_called = false; +#endif // DOXYGEN_SHOULD_SKIP_THIS //-------------------------------------------------------------------------- // Function: IdComponent::incRefCount diff --git a/c++/src/H5Library.cpp b/c++/src/H5Library.cpp index 65f1f00..c8209e5 100644 --- a/c++/src/H5Library.cpp +++ b/c++/src/H5Library.cpp @@ -252,10 +252,12 @@ void H5Library::setFreeListLimits(int reg_global_lim, int reg_list_lim, } } +#ifndef DOXYGEN_SHOULD_SKIP_THIS // Default constructor - private H5Library::H5Library(){} // Destructor - private H5Library::~H5Library(){} +#endif // DOXYGEN_SHOULD_SKIP_THIS } // end namespace diff --git a/c++/src/H5Library.h b/c++/src/H5Library.h index 694b052..71b7792 100644 --- a/c++/src/H5Library.h +++ b/c++/src/H5Library.h @@ -59,9 +59,7 @@ class H5_DLLCPP H5Library { static void termH5cpp(void); #ifndef DOXYGEN_SHOULD_SKIP_THIS - private: - // Default constructor - no instance ever created from outsiders H5Library(); diff --git a/hl/c++/test/ptableTest.cpp b/hl/c++/test/ptableTest.cpp index 68b040e..22c1c1c 100644 --- a/hl/c++/test/ptableTest.cpp +++ b/hl/c++/test/ptableTest.cpp @@ -551,7 +551,6 @@ int SystemTest() return 0; error: - H5E_BEGIN_TRY { H5Tclose(dtypeID1); H5Tclose(dtypeID2); @@ -569,9 +568,14 @@ error: * Previously, data of the field that follows the string was read back * as garbage when #pragma pack(1) is used. * 2016/10/20 -BMR + * Updated: + * #pragma pack(1) caused failure on Emu because Sparc cannot + * access misaligned data. Changed it to pack() to do the + * default alignment. + * 2016/10/25 -BMR *------------------------------------------------------------------------- */ -#pragma pack(1) // no padding +#pragma pack() // default alignment const char* ABHI_PT("/abhiTest"); const hsize_t NUM_PACKETS = 5; const int STRING_LENGTH = 19; // including terminating NULL -- cgit v0.12 From a9e40af5b2ef2d2b9901cd69493b55552d43b33c Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Wed, 26 Oct 2016 09:27:26 -0500 Subject: Description: User's sample code used "not" instead of "!" and Windows does not like that. Fixed. Platforms tested: Linux/32 2.6 (jam) --- hl/c++/test/ptableTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hl/c++/test/ptableTest.cpp b/hl/c++/test/ptableTest.cpp index 22c1c1c..c388af3 100644 --- a/hl/c++/test/ptableTest.cpp +++ b/hl/c++/test/ptableTest.cpp @@ -638,7 +638,7 @@ int TestHDFFV_9758() // Create a packet table FL_PacketTable ptable(fileID, "/examplePacketTable", compound_type, 1); - if (not ptable.IsValid()) + if (!ptable.IsValid()) goto error; // Add packets to the table -- cgit v0.12