diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2021-02-04 14:18:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-04 14:18:09 (GMT) |
commit | edb1324a3aba9a297edd4b1bce7811b54c229454 (patch) | |
tree | 70c403bcbb508c2d40c9b3b78534ac6be9cac69a /config/gnu-warnings | |
parent | 374211e79dd51b6ee0aad4c0fbd47f7c27f4fec4 (diff) | |
download | hdf5-edb1324a3aba9a297edd4b1bce7811b54c229454.zip hdf5-edb1324a3aba9a297edd4b1bce7811b54c229454.tar.gz hdf5-edb1324a3aba9a297edd4b1bce7811b54c229454.tar.bz2 |
Warnings merge 112 (#299)
* OESS-98 fix tools test for plugins
* sync fork
* Merge of changes from dev
* Move problem option to bottom of the list until fixed
* HDFFV-11106 - fix parsing optional args
* HDFFV-11106 add note
* grammer fix
* Whitespace after clang formatting
* Undo format version 11 changes
* Update check to working version
* Merge workflow and minor changes from develop
* Merge dev warnings changes from develop
Diffstat (limited to 'config/gnu-warnings')
-rw-r--r-- | config/gnu-warnings/4.8 | 1 | ||||
-rw-r--r-- | config/gnu-warnings/9.3 | 1 | ||||
-rw-r--r-- | config/gnu-warnings/cxx-4.8 | 26 | ||||
-rw-r--r-- | config/gnu-warnings/cxx-noerror-5 | 11 | ||||
-rw-r--r-- | config/gnu-warnings/cxx-noerror-general | 32 | ||||
-rw-r--r-- | config/gnu-warnings/developer-10 | 6 | ||||
-rw-r--r-- | config/gnu-warnings/noerror-5 | 12 | ||||
-rw-r--r-- | config/gnu-warnings/noerror-8 | 25 | ||||
-rw-r--r-- | config/gnu-warnings/noerror-general | 91 |
9 files changed, 205 insertions, 0 deletions
diff --git a/config/gnu-warnings/4.8 b/config/gnu-warnings/4.8 index 05f4d92..fa678ff 100644 --- a/config/gnu-warnings/4.8 +++ b/config/gnu-warnings/4.8 @@ -9,6 +9,7 @@ # warning flag added for GCC >= 4.5 -Wstrict-overflow=5 + # This warning can only be truly addressed using the gcc extension of # using D to indicate doubles (e.g., 1.23D). -Wno-unsuffixed-float-constants diff --git a/config/gnu-warnings/9.3 b/config/gnu-warnings/9.3 new file mode 100644 index 0000000..f37fdd6 --- /dev/null +++ b/config/gnu-warnings/9.3 @@ -0,0 +1 @@ +-Wc11-c2x-compat diff --git a/config/gnu-warnings/cxx-4.8 b/config/gnu-warnings/cxx-4.8 new file mode 100644 index 0000000..744ebdc --- /dev/null +++ b/config/gnu-warnings/cxx-4.8 @@ -0,0 +1,26 @@ +# warning flags added for GCC >= 4.3 +-Wlarger-than=2560 +-Wlogical-op + +# warning flags added for GCC >= 4.4 +-Wframe-larger-than=16384 +-Wpacked-bitfield-compat +-Wsync-nand + +# warning flag added for GCC >= 4.5 +-Wstrict-overflow=5 + +# warning flags added for GCC >= 4.6 +-Wdouble-promotion +-Wtrampolines + +# warning flag added for GCC >= 4.7 +# +# -Wstack-usage=8192 warnings need to be swept up on a branch so +# that we can stop burdening the whole development team. +# +-Wstack-usage=8192 + +# warning flag added for GCC >= 4.8 +-Wmaybe-uninitialized + diff --git a/config/gnu-warnings/cxx-noerror-5 b/config/gnu-warnings/cxx-noerror-5 new file mode 100644 index 0000000..7bce3e8 --- /dev/null +++ b/config/gnu-warnings/cxx-noerror-5 @@ -0,0 +1,11 @@ +# +# In GCC 4.4.7, the compiler gripes about shadowed global +# declarations when a local variable uses the name of a +# function that's in a system header file. For some reason, +# later versions of GCC (e.g., 5.2.0) don't complain about +# the shadowed globals. Maybe later versions are less fussy? +# Anyway, the shadowing seems to be harmless, and GCC 4.4.7 +# is not a supported compiler, so let us promote shadowed globals +# warnings to errors only for GCC 5 and later. +# +-Wshadow diff --git a/config/gnu-warnings/cxx-noerror-general b/config/gnu-warnings/cxx-noerror-general new file mode 100644 index 0000000..8cc1d94 --- /dev/null +++ b/config/gnu-warnings/cxx-noerror-general @@ -0,0 +1,32 @@ +# +# HDF5 code should not trigger the following warnings under any +# circumstances, so ask the compiler to treat them as errors: +# +# NOTE: c++/test files are not compatible with these warnings as errors +# c++/test/tcompound.cpp +# -Werror=cast-align +-Wcast-align +# NOTE: c++/src files are not compatible with these warnings as errors +# c++/src/H5Object.cpp +# -Werror=missing-declarations +-Wmissing-declarations +-Wpacked +-Wredundant-decls +-Wswitch +# NOTE: c++/test files are not compatible with these warnings as errors +# c++/test/tattr.cpp +# -Werror=unused-but-set-variable +-Wunused-but-set-variable +-Wunused-function +-Wunused-variable +# NOTE: c++/src files are not compatible with these warnings as errors +# c++/src/H5Object.cpp,c++/src/H5StrType.cpp,c++/src/H5PredType.cpp +# -Werror=unused-parameter +-Wunused-parameter +# +# Other files not compatible +# NOTE: c++/test files are not compatible with these warnings as errors +# c++/test/titerate.cpp,c++/test/tarray.cpp +# -Werror=missing-declarations +# c++/test/titerate.cpp,c++/test/tarray.cpp,c++/test/tlinks.cpp,c++/test/ttypes.cpp,c++/test/dsets.cpp +# -Werror=unused-parameter diff --git a/config/gnu-warnings/developer-10 b/config/gnu-warnings/developer-10 new file mode 100644 index 0000000..fcd460d --- /dev/null +++ b/config/gnu-warnings/developer-10 @@ -0,0 +1,6 @@ +# New warning +-Warith-conversion + +# Enable static analysis of program flow +-fanalyzer +-fdiagnostics-path-format=none diff --git a/config/gnu-warnings/noerror-5 b/config/gnu-warnings/noerror-5 new file mode 100644 index 0000000..a7d40dd --- /dev/null +++ b/config/gnu-warnings/noerror-5 @@ -0,0 +1,12 @@ +-Wincompatible-pointer-types +# +# In GCC 4.4.7, the compiler gripes about shadowed global +# declarations when a local variable uses the name of a +# function that's in a system header file. For some reason, +# later versions of GCC (e.g., 5.2.0) don't complain about +# the shadowed globals. Maybe later versions are less fussy? +# Anyway, the shadowing seems to be harmless, and GCC 4.4.7 +# is not a supported compiler, so let us promote shadowed globals +# warnings to errors only for GCC 5 and later. +# +-Wshadow diff --git a/config/gnu-warnings/noerror-8 b/config/gnu-warnings/noerror-8 new file mode 100644 index 0000000..2f54a4d --- /dev/null +++ b/config/gnu-warnings/noerror-8 @@ -0,0 +1,25 @@ +# NOTE: src/ files are not compatible with these warnings as errors +# src/H5Dchunk.c +# -Werror=cast-function-type +-Wcast-function-type +# +# 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. +# +# +# NOTE: File Driver files are not compatible with these warnings as errors +# H5FDlog.c, +# -Werror=maybe-uninitialized +-Wmaybe-uninitialized +# NOTE: src/ files are not compatible with these warnings as errors +# src/H5Shyper.c,src/H5SL.c,src/H5Shyper.c +# -Werror=maybe-uninitialized +# NOTE: Test files are not compatible with these warnings as errors +# test/cache_common.c, +# -Werror=maybe-uninitialized +# NOTE: hl/src/ files are not compatible with these warnings as errors +# hl/src/H5DS.c, +# -Werror=maybe-uninitialized diff --git a/config/gnu-warnings/noerror-general b/config/gnu-warnings/noerror-general new file mode 100644 index 0000000..e19014f --- /dev/null +++ b/config/gnu-warnings/noerror-general @@ -0,0 +1,91 @@ +# +# HDF5 code should not trigger the following warnings under any +# circumstances, so ask the compiler to treat them as errors: +# +-Wbad-function-cast +-Wdeclaration-after-statement +-Wimplicit-function-declaration +-Wmissing-declarations +-Wmissing-prototypes +-Wnested-externs +-Wold-style-definition +-Wpacked +-Wpointer-sign +-Wpointer-to-int-cast +-Wredundant-decls +-Wstrict-prototypes +-Wswitch +# +#-Werror=discarded-qualifiers +# +# +# NOTE: File Driver files are not compatible with these warnings as errors +# H5FDdirect.c,H5FDmpio.c,H5FDros3.c, +# -Werror=unused-function +# +-Wunused-function +# +# H5FDdrvr_module.h +# -Werror=unused-variable +# +-Wunused-variable +# +# H5VLpassthru.c +# -Werror=unused-parameter +# +-Wunused-parameter +# +# +# +# NOTE: Tools files are not compatible with these warnings as errors +# lib/h5tools.c +# -Werror=cast-align +# +-Wcast-align +# +# lib/h5diff_array.c +# -Werror=unused-but-set-variable +# +-Wunused-but-set-variable +# +# lib/h5tools_utils.c +# -Werror=unused-parameter +# +# +# NOTE: JNI files are not compatible with these warnings as errors +# jni/h5pDCPLImp.c,jni/nativeData.c,jni/h5util.c,jni/h5rImp.c +# jni/h5sImp.c,jni/h5tImp.c +# -Werror=cast-align +# jni/h5util.c +# -Werror=format(-overflow) +# +-Wformat +# +# +#Examples and tests do not use the same set of extensive warning flags as libraries +# Here is a list of tests and examples that have issues with the stricter warnings as error +# +# NOTE: Test files are not compatible with these warnings as errors +# thread_id.c, +# -Werror=unused-function +# dsets.c +# -Werror=unused-parameter +# external.c,perform/sio_engine.c +# -Werror=format(-truncation) +# +# +# NOTE: Examples files are not compatible with these warnings as errors +# h5_vds-eiger.c,h5_vds-exclim.c,h5_vds.c,h5_vds-exc.c,h5_vds-percival-unlim-maxmin.c +# h5_vds-percival.c,h5_read.c,h5_rdwt.c,h5_mount.c,h5_extend.c,h5_extend_write.c +# h5_write.c,h5_vds-simpleIO.c,h5_ref2reg_deprec.c,h5_crtgrp.c,h5_select.c +# h5_vds-percival-unlim.c,h5_crtatt.c,h5_group.c,h5_attribute.c,h5_crtdat.c +# h5_reference_deprec.c +# h5_rdwt.c,h5_crtgrp.c,h5_crtatt.c,h5_crtdat.c +# -Werror=strict-prototypes +# h5_rdwt.c,h5_crtgrp.c,h5_crtatt.c,h5_crtdat.c +# -Werror=old-style-definition +# h5_vds-exclim.c,h5_vds.c,h5_vds-exc.c, +# -Werror=unused-variable +# h5_elink_unix2win.c,h5_extlink.c,h5_attribute.c +# -Werror=unused-parameter + |