summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-08-24 18:46:33 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2020-08-24 18:46:33 (GMT)
commit8b93a68b54b7aa776ca4015b637e5d8a7b7712a7 (patch)
tree31f0c9a659404711180dcf7baae54a9d9aa9b9ff
parentcfbe781abd157357d14c850e5beb26f1f4bbfab2 (diff)
parentcfa206696c93b906ecfd318c8d09d997586d213b (diff)
downloadhdf5-8b93a68b54b7aa776ca4015b637e5d8a7b7712a7.zip
hdf5-8b93a68b54b7aa776ca4015b637e5d8a7b7712a7.tar.gz
hdf5-8b93a68b54b7aa776ca4015b637e5d8a7b7712a7.tar.bz2
Merge pull request #2833 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:hdf5_1_10_vfd_badness to hdf5_1_10
* commit 'cfa206696c93b906ecfd318c8d09d997586d213b': Fixes issues with HDFS VFD.
-rw-r--r--src/H5FDhdfs.c25
-rw-r--r--src/H5FDhdfs.h8
2 files changed, 22 insertions, 11 deletions
diff --git a/src/H5FDhdfs.c b/src/H5FDhdfs.c
index 29d032e..b4f70c9 100644
--- a/src/H5FDhdfs.c
+++ b/src/H5FDhdfs.c
@@ -20,6 +20,9 @@
* File System (HDFS).
*/
+/* This source code file is part of the H5FD driver module */
+#include "H5FDdrvr_module.h"
+
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5FDprivate.h" /* File drivers */
@@ -30,11 +33,19 @@
#ifdef H5_HAVE_LIBHDFS
-/* This source code file is part of the H5FD driver module */
-#include "H5FDdrvr_module.h"
-
-/* HDFS routines */
-#include "hdfs.h"
+/* HDFS routines
+ * Have to turn off -Wstrict-prototypes as this header contains functions
+ * defined as foo() instead of foo(void), which triggers warnings that HDF5
+ * then interprets as errors.
+ * -Wundef isn't interpreted as an error by HDF5, but the header does do
+ * some bad symbol interpretation that raises a warning that is out of our
+ * control.
+ */
+H5_GCC_DIAG_OFF(strict-prototypes)
+H5_GCC_DIAG_OFF(undef)
+#include <hdfs.h>
+H5_GCC_DIAG_ON(strict-prototypes)
+H5_GCC_DIAG_ON(undef)
/* toggle function call prints: 1 turns on */
#define HDFS_DEBUG 0
@@ -369,12 +380,12 @@ done:
hid_t
H5FD_hdfs_init(void)
{
- hid_t ret_value = H5I_INVALID_HID; /* Return value */
#if HDFS_STATS
unsigned int bin_i;
#endif
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(H5I_INVALID_HID)
#if HDFS_DEBUG
HDfprintf(stdout, "called %s.\n", FUNC);
diff --git a/src/H5FDhdfs.h b/src/H5FDhdfs.h
index d67ab9e..e195550 100644
--- a/src/H5FDhdfs.h
+++ b/src/H5FDhdfs.h
@@ -29,10 +29,6 @@
#endif /* H5_HAVE_LIBHDFS */
#ifdef H5_HAVE_LIBHDFS
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/****************************************************************************
*
* Structure: H5FD_hdfs_fapl_t
@@ -112,6 +108,10 @@ typedef struct H5FD_hdfs_fapl_t {
int32_t stream_buffer_size;
} H5FD_hdfs_fapl_t;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
H5_DLL hid_t H5FD_hdfs_init(void);
H5_DLL herr_t H5Pget_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa_out);
H5_DLL herr_t H5Pset_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa);