diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2021-03-25 00:39:37 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2021-03-25 00:39:37 (GMT) |
commit | feb20aac304b39e18c70f88cae2f7cf7d5c82db2 (patch) | |
tree | e15d7e751af4e3c42e77ea955d91db4cf27a71cf /test/filter_plugin4_groups.c | |
parent | bdac2ecdbff2c389a222b3d93ff1eb1d23ec6b23 (diff) | |
download | hdf5-feb20aac304b39e18c70f88cae2f7cf7d5c82db2.zip hdf5-feb20aac304b39e18c70f88cae2f7cf7d5c82db2.tar.gz hdf5-feb20aac304b39e18c70f88cae2f7cf7d5c82db2.tar.bz2 |
Formats the source and updates the gcc warning pragmas
Diffstat (limited to 'test/filter_plugin4_groups.c')
-rw-r--r-- | test/filter_plugin4_groups.c | 56 |
1 files changed, 31 insertions, 25 deletions
diff --git a/test/filter_plugin4_groups.c b/test/filter_plugin4_groups.c index 88ea20d..a342d54 100644 --- a/test/filter_plugin4_groups.c +++ b/test/filter_plugin4_groups.c @@ -20,29 +20,36 @@ #include "H5PLextern.h" -#define FILTER4_ID 260 -#define SUFFIX_LEN 8 -#define GROUP_SUFFIX ".h5group" +#define FILTER4_ID 260 +#define SUFFIX_LEN 8 +#define GROUP_SUFFIX ".h5group" -static size_t append_to_group_name(unsigned int flags, size_t cd_nelmts, - const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf); +static size_t append_to_group_name(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 */ - FILTER4_ID, /* Filter ID number */ - 1, /* Encoding enabled */ - 1, /* Decoding enabled */ - "test filter plugin 4", /* Filter name for debugging */ - NULL, /* The "can apply" callback */ - NULL, /* The "set local" callback */ - (H5Z_func_t)append_to_group_name, /* The actual filter function */ + H5Z_CLASS_T_VERS, /* H5Z_class_t version */ + FILTER4_ID, /* Filter ID number */ + 1, /* Encoding enabled */ + 1, /* Decoding enabled */ + "test filter plugin 4", /* Filter name for debugging */ + NULL, /* The "can apply" callback */ + NULL, /* The "set local" callback */ + (H5Z_func_t)append_to_group_name, /* 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: append_to_group_name * @@ -57,10 +64,10 @@ const void *H5PLget_plugin_info(void) {return FILTER_INFO;} *------------------------------------------------------------------------- */ static size_t -append_to_group_name(unsigned int flags, size_t cd_nelmts, - const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf) +append_to_group_name(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values, size_t nbytes, + size_t *buf_size, void **buf) { - size_t new_name_size = 0; /* Return value */ + size_t new_name_size = 0; /* Return value */ /* Check for the correct number of parameters */ if (cd_nelmts > 0) @@ -75,8 +82,8 @@ append_to_group_name(unsigned int flags, size_t cd_nelmts, } else { /* WRITE - Append the suffix to the group name */ - void *outbuf = NULL; /* Pointer to new buffer */ - unsigned char *dst = NULL; /* Temporary pointer to destination buffer */ + void * outbuf = NULL; /* Pointer to new buffer */ + unsigned char *dst = NULL; /* Temporary pointer to destination buffer */ /* Get memory for the new, larger string buffer using the * library's memory allocator. @@ -95,12 +102,11 @@ append_to_group_name(unsigned int flags, size_t cd_nelmts, H5free_memory(*buf); /* Set return values */ - *buf_size = nbytes + SUFFIX_LEN; - *buf = outbuf; - outbuf = NULL; + *buf_size = nbytes + SUFFIX_LEN; + *buf = outbuf; + outbuf = NULL; new_name_size = *buf_size; } return new_name_size; } /* append_to_group_name() */ - |