summaryrefslogtreecommitdiffstats
path: root/test/filter_plugin1_dsets.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2021-03-25 00:39:37 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2021-03-25 00:39:37 (GMT)
commitfeb20aac304b39e18c70f88cae2f7cf7d5c82db2 (patch)
treee15d7e751af4e3c42e77ea955d91db4cf27a71cf /test/filter_plugin1_dsets.c
parentbdac2ecdbff2c389a222b3d93ff1eb1d23ec6b23 (diff)
downloadhdf5-feb20aac304b39e18c70f88cae2f7cf7d5c82db2.zip
hdf5-feb20aac304b39e18c70f88cae2f7cf7d5c82db2.tar.gz
hdf5-feb20aac304b39e18c70f88cae2f7cf7d5c82db2.tar.bz2
Formats the source and updates the gcc warning pragmas
Diffstat (limited to 'test/filter_plugin1_dsets.c')
-rw-r--r--test/filter_plugin1_dsets.c47
1 files changed, 26 insertions, 21 deletions
diff --git a/test/filter_plugin1_dsets.c b/test/filter_plugin1_dsets.c
index a9a53ae..9810678 100644
--- a/test/filter_plugin1_dsets.c
+++ b/test/filter_plugin1_dsets.c
@@ -14,33 +14,39 @@
* Purpose: Test dataset filter plugin for the filter_pluging.c test.
*/
-
#include <stdlib.h>
#include <stdio.h>
#include "H5PLextern.h"
-#define FILTER1_ID 257
+#define FILTER1_ID 257
-static size_t add_sub_value(unsigned int flags, size_t cd_nelmts,
- const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
+static size_t add_sub_value(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values,
+ size_t nbytes, size_t *buf_size, void **buf);
/* Filter class struct */
const H5Z_class2_t FILTER_INFO[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- FILTER1_ID, /* Filter ID number */
- 1, /* Encoding enabled */
- 1, /* Decoding enabled */
- "test filter plugin 1", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- (H5Z_func_t)add_sub_value, /* The actual filter function */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ FILTER1_ID, /* Filter ID number */
+ 1, /* Encoding enabled */
+ 1, /* Decoding enabled */
+ "test filter plugin 1", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ (H5Z_func_t)add_sub_value, /* The actual filter function */
}};
-H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_FILTER;}
-const void *H5PLget_plugin_info(void) {return FILTER_INFO;}
+H5PL_type_t
+H5PLget_plugin_type(void)
+{
+ return H5PL_TYPE_FILTER;
+}
+const void *
+H5PLget_plugin_info(void)
+{
+ return FILTER_INFO;
+}
-
/*-------------------------------------------------------------------------
* Function: add_sub_value
*
@@ -55,12 +61,12 @@ const void *H5PLget_plugin_info(void) {return FILTER_INFO;}
*-------------------------------------------------------------------------
*/
static size_t
-add_sub_value(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values,
- size_t nbytes, size_t *buf_size, void **buf)
+add_sub_value(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values, size_t nbytes,
+ size_t *buf_size, void **buf)
{
- int *int_ptr = (int *)*buf; /* Pointer to the data values */
- size_t buf_left = *buf_size; /* Amount of data buffer left to process */
- int value = 0; /* Data value to add/subtract */
+ int * int_ptr = (int *)*buf; /* Pointer to the data values */
+ size_t buf_left = *buf_size; /* Amount of data buffer left to process */
+ int value = 0; /* Data value to add/subtract */
/* Check for the correct number of parameters */
if (0 == cd_nelmts)
@@ -90,4 +96,3 @@ add_sub_value(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_value
return nbytes;
} /* end add_sub_value() */
-