clang-format: re-format for clang-19
clang-format-19 isn't compatible with the clang-format-18 output, so we
need to reformat the code with the latest version. A few parameters
in clang-tidy have been deprecated, so adjust the style file
accordingly.
See Ie2f6eb3b043f2d655c9df806815afd7971fd0947 for updated style.
See I88192b41ab7a95599a90915013579608af7bc56f for clang-19 enablement.
Change-Id: Ie38f1c94398df0d663d0e27d2e2e1d0d77a47fae
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/tests/dsp/firmware_update.cpp b/tests/dsp/firmware_update.cpp
index bfaa020..6a2ec68 100644
--- a/tests/dsp/firmware_update.cpp
+++ b/tests/dsp/firmware_update.cpp
@@ -1705,9 +1705,7 @@
constexpr size_t payloadLen =
PLDM_QUERY_DOWNSTREAM_IDENTIFIERS_RESP_MIN_LEN + downstream_devices_len;
- struct pldm_query_downstream_identifiers_resp resp_data
- {
- };
+ struct pldm_query_downstream_identifiers_resp resp_data{};
PLDM_MSG_DEFINE_P(response, payloadLen);
struct pldm_downstream_device_iter devs;
struct pldm_downstream_device dev;
@@ -1820,9 +1818,7 @@
constexpr size_t payloadLen =
PLDM_QUERY_DOWNSTREAM_IDENTIFIERS_RESP_MIN_LEN + downstream_devices_len;
- struct pldm_query_downstream_identifiers_resp resp_data
- {
- };
+ struct pldm_query_downstream_identifiers_resp resp_data{};
PLDM_MSG_DEFINE_P(response, payloadLen);
struct pldm_downstream_device_iter devs;
struct pldm_downstream_device dev;
@@ -1940,9 +1936,7 @@
constexpr size_t payloadLen =
PLDM_QUERY_DOWNSTREAM_IDENTIFIERS_RESP_MIN_LEN + downstream_devices_len;
- struct pldm_query_downstream_identifiers_resp resp_data
- {
- };
+ struct pldm_query_downstream_identifiers_resp resp_data{};
PLDM_MSG_DEFINE_P(response, payloadLen);
struct pldm_downstream_device_iter devs;
struct pldm_downstream_device dev;
diff --git a/tests/dsp/platform.cpp b/tests/dsp/platform.cpp
index 6f1c181..d2f7eba 100644
--- a/tests/dsp/platform.cpp
+++ b/tests/dsp/platform.cpp
@@ -18,12 +18,8 @@
TEST(StateEffecterPdr, testIncorrectInvocations)
{
- struct state_effecter_possible_states possible_states
- {
- };
- struct pldm_state_effecter_pdr effecter
- {
- };
+ struct state_effecter_possible_states possible_states{};
+ struct pldm_state_effecter_pdr effecter{};
size_t actual_size;
int rc;
@@ -62,12 +58,8 @@
TEST(StateEffecterPdr, testReasonableInvocations)
{
- struct state_effecter_possible_states possible_states
- {
- };
- struct pldm_state_effecter_pdr effecter
- {
- };
+ struct state_effecter_possible_states possible_states{};
+ struct pldm_state_effecter_pdr effecter{};
size_t actual_size;
int rc;
@@ -5503,13 +5495,8 @@
{{EFFECTER_OPER_STATE_ENABLED_NOUPDATEPENDING, 2, 2},
{EFFECTER_OPER_STATE_ENABLED_UPDATEPENDING, 2, 3}}};
- struct pldm_get_state_effecter_states_resp resp_fields
- {
- PLDM_SUCCESS, comp_effecterCnt,
- {
- stateField[0], stateField[1]
- }
- };
+ struct pldm_get_state_effecter_states_resp resp_fields{
+ PLDM_SUCCESS, comp_effecterCnt, {stateField[0], stateField[1]}};
auto rc = encode_get_state_effecter_states_resp(
0, &resp_fields, response, responseMsg.size() - hdrSize);
@@ -5550,12 +5537,7 @@
TEST(GetStateEffecterStates, testBadEncodeResponse)
{
- struct pldm_get_state_effecter_states_resp resp
- {
- PLDM_SUCCESS, 0,
- {
- }
- };
+ struct pldm_get_state_effecter_states_resp resp{PLDM_SUCCESS, 0, {}};
auto rc = decode_get_state_effecter_states_resp(nullptr, 0, &resp);
EXPECT_EQ(rc, -EINVAL);
diff --git a/tests/responder.cpp b/tests/responder.cpp
index 6a0a3fd..9555148 100644
--- a/tests/responder.cpp
+++ b/tests/responder.cpp
@@ -5,9 +5,7 @@
TEST(Responder, track_untrack_one)
{
- struct pldm_responder_cookie jar
- {
- };
+ struct pldm_responder_cookie jar{};
struct pldm_responder_cookie cookie = {
.tid = 1,
.instance_id = 1,
@@ -24,9 +22,7 @@
TEST(Responder, untrack_none)
{
- struct pldm_responder_cookie jar
- {
- };
+ struct pldm_responder_cookie jar{};
ASSERT_EQ(jar.next, nullptr);
ASSERT_EQ(pldm_responder_cookie_untrack(&jar, 1, 1, 0, 0x01), nullptr);
@@ -35,9 +31,7 @@
TEST(Responder, track_one_untrack_bad)
{
- struct pldm_responder_cookie jar
- {
- };
+ struct pldm_responder_cookie jar{};
struct pldm_responder_cookie cookie = {
.tid = 1,
.instance_id = 1,
@@ -59,9 +53,7 @@
TEST(Responder, track_untrack_two)
{
- struct pldm_responder_cookie jar
- {
- };
+ struct pldm_responder_cookie jar{};
struct pldm_responder_cookie cookies[] = {
{
.tid = 1,