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 /src/H5PL.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 'src/H5PL.c')
-rw-r--r-- | src/H5PL.c | 66 |
1 files changed, 26 insertions, 40 deletions
@@ -14,48 +14,39 @@ /* Module Setup */ /****************/ -#include "H5PLmodule.h" /* This source code file is part of the H5PL module */ - +#include "H5PLmodule.h" /* This source code file is part of the H5PL module */ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5PLpkg.h" /* Plugin */ - +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5PLpkg.h" /* Plugin */ /****************/ /* Local Macros */ /****************/ - /******************/ /* Local Typedefs */ /******************/ - /********************/ /* Local Prototypes */ /********************/ - /*********************/ /* Package Variables */ /*********************/ - /*****************************/ /* Library Private Variables */ /*****************************/ - /*******************/ /* Local Variables */ /*******************/ - - /*------------------------------------------------------------------------- * Function: H5PLset_loading_state * @@ -83,20 +74,19 @@ herr_t H5PLset_loading_state(unsigned int plugin_control_mask) { - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE1("e", "Iu", plugin_control_mask); /* Set the plugin control mask */ - if(H5PL__set_plugin_control_mask(plugin_control_mask) < 0) + if (H5PL__set_plugin_control_mask(plugin_control_mask) < 0) HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "error setting plugin control mask") done: FUNC_LEAVE_API(ret_value) } /* end H5PLset_loading_state() */ - /*------------------------------------------------------------------------- * Function: H5PLget_loading_state * @@ -116,7 +106,7 @@ done: herr_t H5PLget_loading_state(unsigned int *plugin_control_mask) { - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE1("e", "*Iu", plugin_control_mask); @@ -125,14 +115,13 @@ H5PLget_loading_state(unsigned int *plugin_control_mask) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_control_mask parameter cannot be NULL") /* Set the plugin control mask */ - if(H5PL__get_plugin_control_mask(plugin_control_mask) < 0) + if (H5PL__get_plugin_control_mask(plugin_control_mask) < 0) HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "error getting plugin control mask") done: FUNC_LEAVE_API(ret_value) } /* end H5PLget_loading_state() */ - /*------------------------------------------------------------------------- * Function: H5PLappend * @@ -165,7 +154,6 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5PLappend() */ - /*------------------------------------------------------------------------- * Function: H5PLprepend * @@ -198,7 +186,6 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5PLprepend() */ - /*------------------------------------------------------------------------- * Function: H5PLreplace * @@ -212,8 +199,8 @@ done: herr_t H5PLreplace(const char *search_path, unsigned int idx) { - unsigned num_paths; /* Current number of stored paths */ - herr_t ret_value = SUCCEED; /* Return value */ + unsigned num_paths; /* Current number of stored paths */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE2("e", "*sIu", search_path, idx); @@ -229,7 +216,8 @@ H5PLreplace(const char *search_path, unsigned int idx) if (0 == num_paths) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "path table is empty") else if (idx >= num_paths) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "index path out of bounds for table - can't be more than %u", (num_paths - 1)) + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, + "index path out of bounds for table - can't be more than %u", (num_paths - 1)) /* Insert the search path into the path table */ if (H5PL__replace_path(search_path, idx) < 0) @@ -239,7 +227,6 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5PLreplace() */ - /*------------------------------------------------------------------------- * Function: H5PLinsert * @@ -254,8 +241,8 @@ done: herr_t H5PLinsert(const char *search_path, unsigned int idx) { - unsigned num_paths; /* Current number of stored paths */ - herr_t ret_value = SUCCEED; /* Return value */ + unsigned num_paths; /* Current number of stored paths */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE2("e", "*sIu", search_path, idx); @@ -269,7 +256,8 @@ H5PLinsert(const char *search_path, unsigned int idx) /* Check index */ num_paths = H5PL__get_num_paths(); if ((0 != num_paths) && (idx >= num_paths)) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "index path out of bounds for table - can't be more than %u", (num_paths - 1)) + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, + "index path out of bounds for table - can't be more than %u", (num_paths - 1)) /* Insert the search path into the path table */ if (H5PL__insert_path(search_path, idx) < 0) @@ -279,7 +267,6 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5PLinsert() */ - /*------------------------------------------------------------------------- * Function: H5PLremove * @@ -296,8 +283,8 @@ done: herr_t H5PLremove(unsigned int idx) { - unsigned num_paths; /* Current number of stored paths */ - herr_t ret_value = SUCCEED; /* Return value */ + unsigned num_paths; /* Current number of stored paths */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE1("e", "Iu", idx); @@ -307,7 +294,8 @@ H5PLremove(unsigned int idx) if (0 == num_paths) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "path table is empty") else if (idx >= num_paths) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "index path out of bounds for table - can't be more than %u", (num_paths - 1)) + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, + "index path out of bounds for table - can't be more than %u", (num_paths - 1)) /* Delete the search path from the path table */ if (H5PL__remove_path(idx) < 0) @@ -317,7 +305,6 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5PLremove() */ - /*------------------------------------------------------------------------- * Function: H5PLget * @@ -345,10 +332,10 @@ done: ssize_t H5PLget(unsigned int idx, char *path_buf, size_t buf_size) { - unsigned num_paths; /* Current number of stored paths */ - const char *path = NULL; /* path from table */ - size_t path_len = 0; /* Length of path */ - ssize_t ret_value = 0; /* Return value */ + unsigned num_paths; /* Current number of stored paths */ + const char *path = NULL; /* path from table */ + size_t path_len = 0; /* Length of path */ + ssize_t ret_value = 0; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE3("Zs", "Iu*sz", idx, path_buf, buf_size); @@ -358,7 +345,8 @@ H5PLget(unsigned int idx, char *path_buf, size_t buf_size) if (0 == num_paths) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "path table is empty") else if (idx >= num_paths) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "index path out of bounds for table - can't be more than %u", (num_paths - 1)) + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, + "index path out of bounds for table - can't be more than %u", (num_paths - 1)) /* Check if the search table is empty */ if (H5PL__get_num_paths() == 0) @@ -383,7 +371,6 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5PLget() */ - /*------------------------------------------------------------------------- * Function: H5PLsize * @@ -412,4 +399,3 @@ H5PLsize(unsigned int *num_paths) done: FUNC_LEAVE_API(ret_value) } /* end H5PLsize() */ - |