* Fixed various -Wmissing-variable-declarations by adding static keyword
* In a few cases, renamed the variable suffix from _g to _s.
* Fixed some -Wmissing-variable-declarations by using different declaration macros
* Fixed various -Wconditional-uninitialized warnings by just initializing variable to zero
* Fixed various -Wcomma warnings
* Fixed clang -Wstrict-prototypes warnings
* Fixed various -Wunused-variable warnings
* Updated some casts to fix the only 3 -Wcast-qual warnings
* Fixed the only -Wsometimes-uninitialized warning
* Adds semicolons to function-like macros
* Adds a do..while(0) loop to some macros
* Removes semicolons when inappropriate, especially H5E_TRY_BEGIN/END
* Add java options to build scripts
Previously, cmakehdf5 turned on compiling of the java interface
by default due to a value set in cacheinit.cmake.
Now, consistent with how Fortran and CPP interfaces are handled,
the script overwrites this default value to disable the libraries,
fixing #2958.
I also implemented the --enable-java/--disable java options for
cmakehdf5, and -java for buildhdf5.
Allen said these scripts should mention that
compilers are to be specified in environment variables, but missing
compilers causes errors at the CMake level, and
CMake's error messages are already pretty informative (See the one
in #2958 about JAVA_COMPILER).
* Remove unused HD macros
The library prefixes most C and POSIX API calls with 'HD'. We are
going to start removing these so the code looks like normal C.
This PR removes most of the unused HD markup macros.
* Replace ntohl/ntohs
src/H5system.c:1293:13: warning: Dereference of null pointer
[clang-analyzer-core.NullDereference]
src/H5trace.c:4048:17: warning: Passed-by-value struct argument contains
uninitialized data (e.g., via the field chain: 'initial.user')
[clang-analyzer-core.CallAndMessage]
Removes H5detect and H5make_libsettings from the build and replaces
their functionality with things that don't affect cross-compiling.
H5detect --> floating-point types are now detected on library load
H5make_libsettings --> Moved functionality to a new H5build_settings.c template file
Several options and public symbols that were provided to paper
over non-standard long double conversions between signed/unsigned
long and long long values were removed from the Autotools and
CMake. These were added twenty years ago, when C99 and 64-bit
platforms were less common and are no longer needed.
Autotools:
--enable-dconv-accuracy
CMake:
HDF5_WANT_DATA_ACCURACY
H5pubconf.h symbols:
H5_WANT_DATA_ACCURACY
H5_LDOUBLE_TO_LONG_SPECIAL
H5_LONG_TO_LDOUBLE_SPECIAL
H5_LDOUBLE_TO_LLONG_ACCURATE
H5_LLONG_TO_LDOUBLE_CORRECT
H5_DISABLE_SOME_LDOUBLE_CONV
The C99 standard says that a long long is 8+ bytes. This change
removes a few parts of the code where we assume that a long long
could be less than that.
When copying an empty enum type (including implicitly, as when an enum
is contained in a compound type), the library would allocate 0-size
blocks of memory and attempt to memcpy 0 bytes from NULL pointers, which
are undefined behavior. In debug mode, the library would raise an
assert in H5MM.
The library now avoid undefined memory operations when copying empty
enum types and a test that copies empty enums has been added.
Adds some H5pubconf.h entries and cpp flags for building on MinGW
using the Autotools.
Also updates the Windows-related H5pubconf.h comments to be more
accurate in CMake.
* HDFCompilerFlags: mask -fstdarg-opt with clang-tidy
`clang-tidy` doesn't understand this `-f` flag and errors out.
* Add helpful comment
---------
Co-authored-by: Sean McBride <sean@rogue-research.com>
In both CMake and the Autotools, remove checks for:
* lstat
* srandom
In CMake, remove checks for:
* string.h
* strings.h
* stdlib.h
We assume these exist. Configure will always check for them (we don't
add any special code to do this), but there's no reason to duplicate
that nonsense in CMake.