summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/dynlib_rpk.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-11-21 03:48:01 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-11-21 03:48:01 (GMT)
commit05b604da9abdb85e0aeeec5128cb9ebb57aeea32 (patch)
treede721c0885aa96413f88aa64fdc8fb7505b5a6be /tools/h5repack/dynlib_rpk.c
parentc327c727cf633192e64bf90405f581454de770b3 (diff)
downloadhdf5-05b604da9abdb85e0aeeec5128cb9ebb57aeea32.zip
hdf5-05b604da9abdb85e0aeeec5128cb9ebb57aeea32.tar.gz
hdf5-05b604da9abdb85e0aeeec5128cb9ebb57aeea32.tar.bz2
[svn-r28433] Misc warning and cleanup fixes.
Tested on Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1 serial only
Diffstat (limited to 'tools/h5repack/dynlib_rpk.c')
-rw-r--r--tools/h5repack/dynlib_rpk.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/tools/h5repack/dynlib_rpk.c b/tools/h5repack/dynlib_rpk.c
index 1ccc33a..6e8a7b6 100644
--- a/tools/h5repack/dynlib_rpk.c
+++ b/tools/h5repack/dynlib_rpk.c
@@ -24,6 +24,18 @@
#define H5Z_FILTER_DYNLIB1 257
+/* gcc attribute support from H5private.h */
+#ifdef __cplusplus
+# define H5_ATTR_CONST /*void*/
+#else /* __cplusplus */
+#if defined(H5_HAVE_ATTRIBUTE) && !defined(__SUNPRO_C)
+# define H5_ATTR_CONST __attribute__((const))
+#else
+# define H5_ATTR_CONST /*void*/
+#endif
+#endif /* __cplusplus */
+
+
static size_t H5Z_filter_dynlib1(unsigned int flags, size_t cd_nelmts,
const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
@@ -38,8 +50,8 @@ const H5Z_class2_t H5Z_DYNLIB1[1] = {{
(H5Z_func_t)H5Z_filter_dynlib1, /* The actual filter function */
}};
-H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_FILTER;}
-const void *H5PLget_plugin_info(void) {return H5Z_DYNLIB1;}
+H5_ATTR_CONST H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_FILTER;}
+H5_ATTR_CONST const void *H5PLget_plugin_info(void) {return H5Z_DYNLIB1;}
/*-------------------------------------------------------------------------
* Function: H5Z_filter_dynlib1