summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
diff options
context:
space:
mode:
authorQuincey Koziol <quincey@koziol.cc>2023-12-29 14:42:35 (GMT)
committerGitHub <noreply@github.com>2023-12-29 14:42:35 (GMT)
commit3a21ee0877ecea5593112b7c8370cb8571a7e627 (patch)
tree6a1cde6a6027859601d28375ba299e4556be25d5 /src/H5private.h
parent6ffc55c6d9c1f3a30e4db1bc71c452c50952ee85 (diff)
downloadhdf5-3a21ee0877ecea5593112b7c8370cb8571a7e627.zip
hdf5-3a21ee0877ecea5593112b7c8370cb8571a7e627.tar.gz
hdf5-3a21ee0877ecea5593112b7c8370cb8571a7e627.tar.bz2
Add 'warning density' computation to the warnhist script (#3910)
* Add 'warning density' computation to the warnhist script, along with several cleanups to it. Add "--enable-show-all-warnings" configure (and CMake) option to disable compiler diagnostic suppression (and therefore show all the otherwise suppressed compiler diagnostics), disabled by default. Clean up a buncn of misc. warnings. Signed-off-by: Quincey Koziol <qkoziol@amazon.com>
Diffstat (limited to 'src/H5private.h')
-rw-r--r--src/H5private.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/H5private.h b/src/H5private.h
index 3aaa0d5..5663c00 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -497,8 +497,16 @@
#define H5_DIAG_DO_PRAGMA(x) _Pragma(#x)
#define H5_DIAG_PRAGMA(x) H5_DIAG_DO_PRAGMA(GCC diagnostic x)
+/* Allow suppression of compiler diagnostics unless H5_SHOW_ALL_WARNINGS is
+ * defined (enabled with '--enable-show-all-warnings' configure option).
+ */
+#ifndef H5_SHOW_ALL_WARNINGS
#define H5_DIAG_OFF(x) H5_DIAG_PRAGMA(push) H5_DIAG_PRAGMA(ignored H5_DIAG_JOINSTR("-W", x))
#define H5_DIAG_ON(x) H5_DIAG_PRAGMA(pop)
+#else
+#define H5_DIAG_OFF(x)
+#define H5_DIAG_ON(x)
+#endif
/* Macros for enabling/disabling particular GCC-only warnings.
* These pragmas are only implemented usefully in gcc 4.6+