clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository[1] and reformat
the repository.
[1] https://gerrit.openbmc.org/c/openbmc/docs/+/63441
Further, shift the fixup for C's `_Static_assert` into src/msgbuf.h to
prevent a clang-tidy-16 error:
```
/data0/jenkins/workspace/ci-repository/openbmc/libpldm/src/msgbuf.h:315:2: error: '_Static_assert' is a C11 extension [clang-diagnostic-c11-extensions,-warnings-as-errors]
_Static_assert(sizeof(*dst) == sizeof(ldst),
^
```
And fix up the function prototype in the definition of `pldm_open()`:
```
../src/requester/pldm.c:128:16: error: a function declaration without a prototype is deprecated in all versions of C [clang-diagnostic-strict-prototypes,-warnings-as-errors]
void pldm_close()
^
void
```
Change-Id: I57b53f51914e39237e733d024e62ab41b3d306c1
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/include/libpldm/pdr.h b/include/libpldm/pdr.h
index 8b5f6a7..5443fba 100644
--- a/include/libpldm/pdr.h
+++ b/include/libpldm/pdr.h
@@ -206,9 +206,9 @@
* @return uint32_t - record handle assigned to PDR record
*/
const pldm_pdr_record *pldm_pdr_fru_record_set_find_by_rsi(
- const pldm_pdr *repo, uint16_t fru_rsi, uint16_t *terminus_handle,
- uint16_t *entity_type, uint16_t *entity_instance_num,
- uint16_t *container_id);
+ const pldm_pdr *repo, uint16_t fru_rsi, uint16_t *terminus_handle,
+ uint16_t *entity_type, uint16_t *entity_instance_num,
+ uint16_t *container_id);
/* =========================== */
/* Entity Association PDR APIs */
@@ -258,9 +258,9 @@
* @return pldm_entity_node* - opaque pointer to added entity
*/
pldm_entity_node *pldm_entity_association_tree_add(
- pldm_entity_association_tree *tree, pldm_entity *entity,
- uint16_t entity_instance_number, pldm_entity_node *parent,
- uint8_t association_type);
+ pldm_entity_association_tree *tree, pldm_entity *entity,
+ uint16_t entity_instance_number, pldm_entity_node *parent,
+ uint8_t association_type);
/** @brief Visit and note each entity in the entity association tree
*
@@ -328,8 +328,8 @@
* @param[in] terminus_handle - terminus handle of the terminus
*/
void pldm_entity_association_pdr_add_from_node(
- pldm_entity_node *node, pldm_pdr *repo, pldm_entity **entities,
- size_t num_entities, bool is_remote, uint16_t terminus_handle);
+ pldm_entity_node *node, pldm_pdr *repo, pldm_entity **entities,
+ size_t num_entities, bool is_remote, uint16_t terminus_handle);
/** @brief Find entity reference in tree
*
@@ -375,15 +375,15 @@
* @param[in/out] new_tree - pointer to destination tree
*/
void pldm_entity_association_tree_copy_root(
- pldm_entity_association_tree *org_tree,
- pldm_entity_association_tree *new_tree);
+ pldm_entity_association_tree *org_tree,
+ pldm_entity_association_tree *new_tree);
/** @brief Destroy all the nodes of the entity association tree
*
* @param[in] tree - pointer to entity association tree
*/
void pldm_entity_association_tree_destroy_root(
- pldm_entity_association_tree *tree);
+ pldm_entity_association_tree *tree);
/** @brief Check whether the entity association tree is empty
*