summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-12-02 14:00:20 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-12-02 14:00:20 (GMT)
commit7e92c2e3e503abd983fe5557efa78e61474a7850 (patch)
tree62969dd4d35575d1fad78a860a76c61d2da8a130 /config
parentdcae4544a3cf7b262aeb8e934b55b40fd59ca25a (diff)
parent0772b975d1d2bfa15aedeb4b6e2c2aac78c61a2f (diff)
downloadhdf5-7e92c2e3e503abd983fe5557efa78e61474a7850.zip
hdf5-7e92c2e3e503abd983fe5557efa78e61474a7850.tar.gz
hdf5-7e92c2e3e503abd983fe5557efa78e61474a7850.tar.bz2
Merging in latest from upstream (HDFFV/hdf5:refs/heads/develop)
* commit '0772b975d1d2bfa15aedeb4b6e2c2aac78c61a2f': Fix missing free in H5T__ref_mem_read() Fix bugs in H5VL file comparison code. Add short circuit success to H5VL_cmp_connector_cls(). Implement file comparison VOL callback. Other changes to allow references to work with non-native connectors. There is a bug somewhere. Add support for point selections to H5S_select_project_intersection. Remove H5VL_NATIVE_FILE_GET_FILE_ID and add H5VL_OBJECT_GET_FILE Revert "Make a squash commit of 'Quiet some warnings by adjusting warnings level and fixing some code.' (commit 5c911d8baf3)" Revert "Oops, remove more C99 designated initializers for VS 2010 compatibility." H5R: fix H5Tconv to check for null references Trivial parameter renaming in VOL API calls. Move checking for zero offset in selection adjust calls to the selection callbacks. This makes the procedure for checking it consistent across selection types and between _s and _u, ensures it is always is performed even when called within the H5S package, and removes the redundant check that would occur when callins H5S_select_adjust_s() from outside the H5S package. Replace H5Sselect_adjust_u() and H5Shyper_adjust_s() with H5Sselect_adjust. Implement "adjust_s" callback for all selection types. Add range checking to H5Sselect_adjust().
Diffstat (limited to 'config')
-rw-r--r--config/commence.am2
-rw-r--r--config/gnu-flags98
2 files changed, 12 insertions, 88 deletions
diff --git a/config/commence.am b/config/commence.am
index 830c494..a16eee5 100644
--- a/config/commence.am
+++ b/config/commence.am
@@ -70,7 +70,7 @@ H5CPP=${DESTDIR}$(bindir)/h5c++
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS=@AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
+AM_CFLAGS=@AM_CFLAGS@ @H5_CFLAGS@
AM_FCFLAGS=@AM_FCFLAGS@ @H5_FCFLAGS@
AM_CXXFLAGS=@AM_CXXFLAGS@ @H5_CXXFLAGS@
AM_CPPFLAGS=@AM_CPPFLAGS@ @H5_CPPFLAGS@
diff --git a/config/gnu-flags b/config/gnu-flags
index bc120a8..6355ccf 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -168,44 +168,12 @@ if test "X-gcc" = "X-$cc_vendor"; then
# NOTE: Disable the -Wformat-nonliteral from -Wformat=2 here and re-add
# it to the developer flags.
#
- H5_CFLAGS="$H5_CFLAGS -pedantic -Wall -Wextra"
- H5_ECFLAGS="$H5_ECFLAGS -Werror=bad-function-cast"
- H5_ECFLAGS="$H5_ECFLAGS -Werror=cast-align"
- H5_CFLAGS="$H5_CFLAGS -Wcast-qual -Wconversion"
- H5_ECFLAGS="$H5_ECFLAGS -Werror=declaration-after-statement"
- DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wdisabled-optimization"
- H5_CFLAGS="$H5_CFLAGS -Wfloat-equal"
- H5_CFLAGS="$H5_CFLAGS -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch"
- H5_ECFLAGS="$H5_ECFLAGS -Werror=missing-declarations"
- H5_CFLAGS="$H5_CFLAGS -Wmissing-include-dirs"
- H5_ECFLAGS="$H5_ECFLAGS -Werror=missing-prototypes"
- H5_ECFLAGS="$H5_ECFLAGS -Werror=nested-externs"
- H5_ECFLAGS="$H5_ECFLAGS -Werror=old-style-definition"
- H5_ECFLAGS="$H5_ECFLAGS -Werror=packed"
- H5_ECFLAGS="$H5_ECFLAGS -Werror=redundant-decls"
- H5_ECFLAGS="$H5_ECFLAGS -Werror=shadow"
- H5_ECFLAGS="$H5_ECFLAGS -Werror=strict-prototypes"
- DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wswitch-default"
- DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wswitch-enum"
- H5_CFLAGS="$H5_CFLAGS -Wundef"
- DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wunused-macros"
- DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wunsafe-loop-optimizations"
- H5_CFLAGS="$H5_CFLAGS -Wwrite-strings"
-
- #
- # HDF5 code should not trigger the following warnings under any
- # circumstances, so ask the compiler to treat them as errors:
- #
-# H5_ECFLAGS="$H5_ECFLAGS -Werror=discarded-qualifiers"
- H5_ECFLAGS="$H5_ECFLAGS -Werror=implicit-function-declaration"
- H5_CFLAGS="$H5_CFLAGS -Wmaybe-uninitialized"
- H5_ECFLAGS="$H5_ECFLAGS -Werror=pointer-sign"
- H5_ECFLAGS="$H5_ECFLAGS -Werror=pointer-to-int-cast"
- H5_ECFLAGS="$H5_ECFLAGS -Werror=switch"
- H5_ECFLAGS="$H5_ECFLAGS -Werror=unused-but-set-variable"
- H5_ECFLAGS="$H5_ECFLAGS -Werror=unused-function"
- H5_ECFLAGS="$H5_ECFLAGS -Werror=unused-parameter"
- H5_ECFLAGS="$H5_ECFLAGS -Werror=unused-variable"
+ H5_CFLAGS="$H5_CFLAGS -pedantic -Wall -Wextra -Wbad-function-cast -Wc++-compat -Wcast-align"
+ H5_CFLAGS="$H5_CFLAGS -Wcast-qual -Wconversion -Wdeclaration-after-statement -Wdisabled-optimization -Wfloat-equal"
+ H5_CFLAGS="$H5_CFLAGS -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-include-dirs"
+ H5_CFLAGS="$H5_CFLAGS -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked"
+ H5_CFLAGS="$H5_CFLAGS -Wredundant-decls -Wshadow -Wstrict-prototypes -Wswitch-enum -Wswitch-default"
+ H5_CFLAGS="$H5_CFLAGS -Wundef -Wunused-macros -Wunsafe-loop-optimizations -Wwrite-strings"
######################
# Developer warnings #
@@ -254,34 +222,17 @@ if test "X-gcc" = "X-$cc_vendor"; then
# gcc 4.3
if test $cc_vers_major -ge 5 -o $cc_vers_major -eq 4 -a $cc_vers_minor -ge 3; then
- H5_CFLAGS="$H5_CFLAGS -Wlogical-op"
- #
- # Lots of noise, questionable benefit:
- #
- DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wlarger-than=2560"
- #
+ H5_CFLAGS="$H5_CFLAGS -Wlogical-op -Wlarger-than=2560"
fi
# gcc 4.4
if test $cc_vers_major -ge 5 -o $cc_vers_major -eq 4 -a $cc_vers_minor -ge 4; then
- H5_CFLAGS="$H5_CFLAGS -Wsync-nand -Wpacked-bitfield-compat"
- #
- # Lots of noise, questionable benefit:
- #
- DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wframe-larger-than=16384"
- #
+ H5_CFLAGS="$H5_CFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
fi
# gcc 4.5
if test $cc_vers_major -ge 5 -o $cc_vers_major -eq 4 -a $cc_vers_minor -ge 5; then
- H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow=5 -Wunsuffixed-float-constants"
- #
- # -Wjump-misses-init makes lots of noise for a questionable benefit.
- # Can jumping over an initialization in C cause any harm, if
- # the variable is never *used* before it has been initialized?
- #
- DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wjump-misses-init"
- #
+ H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants"
fi
# gcc 4.6
@@ -293,17 +244,7 @@ if test "X-gcc" = "X-$cc_vendor"; then
# gcc 4.7
if test $cc_vers_major -ge 5 -o $cc_vers_major -eq 4 -a $cc_vers_minor -ge 7; then
- #
- # It's not clear that -Wvector-operation-performance warnings are
- # actionable.
- #
- # -Wstack-usage=8192 warnings need better justification;
- # if justifiable, should be enabled on a branch and swept up there
- # before burdening the whole development team.
- #
- DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wstack-usage=8192"
- DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wvector-operation-performance"
-
+ H5_CFLAGS="$H5_CFLAGS -Wstack-usage=8192 -Wvector-operation-performance"
DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn"
NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-suggest-attribute=pure -Wno-suggest-attribute=noreturn"
fi
@@ -322,21 +263,11 @@ if test "X-gcc" = "X-$cc_vendor"; then
# gcc 5
if test $cc_vers_major -ge 5; then
H5_CFLAGS="$H5_CFLAGS -Warray-bounds=2 -Wc99-c11-compat"
- H5_ECFLAGS="$H5_ECFLAGS -Werror=incompatible-pointer-types"
fi
# gcc 6
if test $cc_vers_major -ge 6; then
- H5_CFLAGS="$H5_CFLAGS -Wunused-const-variable -Whsa -Wnormalized"
- #
- # Unacceptably noisy on HDF5 right now.
- #
- DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wnull-dereference"
- #
- # Careful! -Wduplicated-cond, combined with HDF5's heavy use of
- # macros, can make a lot of noise.
- #
- DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wduplicated-cond"
+ H5_CFLAGS="$H5_CFLAGS -Wnull-dereference -Wunused-const-variable -Wduplicated-cond -Whsa -Wnormalized"
fi
# gcc 7
@@ -347,13 +278,6 @@ if test "X-gcc" = "X-$cc_vendor"; then
# gcc 8
if test $cc_vers_major -ge 8; then
- # For GCC 8, promote maybe-initialized warnings to an error. GCC 8
- # reports 0 maybe-uninitialized warnings where earlier versions
- # make many false reports. GCC 8 seems to analyze calls to static
- # in order to detect initializations that occur there. It's possible
- # that GCC 8 only performs that analysis at -O3, though.
- H5_ECFLAGS="$H5_ECFLAGS -Werror=maybe-uninitialized"
- H5_ECFLAGS="$H5_ECFLAGS -Werror=cast-function-type"
DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wstringop-overflow=4 -Wsuggest-attribute=cold -Wsuggest-attribute=malloc"
NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-suggest-attribute=cold -Wno-suggest-attribute=malloc"
H5_CFLAGS="$H5_CFLAGS -Wattribute-alias -Wcast-align=strict -Wshift-overflow=2"