summaryrefslogtreecommitdiffstats
path: root/src/H5FDhdfs.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-08-24 17:36:07 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2020-08-24 17:36:07 (GMT)
commitcfa206696c93b906ecfd318c8d09d997586d213b (patch)
tree31f0c9a659404711180dcf7baae54a9d9aa9b9ff /src/H5FDhdfs.c
parentcfbe781abd157357d14c850e5beb26f1f4bbfab2 (diff)
downloadhdf5-cfa206696c93b906ecfd318c8d09d997586d213b.zip
hdf5-cfa206696c93b906ecfd318c8d09d997586d213b.tar.gz
hdf5-cfa206696c93b906ecfd318c8d09d997586d213b.tar.bz2
Fixes issues with HDFS VFD.
- Warning from hdfs.h interpreted as an error under gcc - Incorrect order of headers results inn incorrect initialization - <hdfs.h> not "hdfs.h" - Other misc tidying
Diffstat (limited to 'src/H5FDhdfs.c')
-rw-r--r--src/H5FDhdfs.c25
1 files changed, 18 insertions, 7 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);