diff --git a/.clang-tidy b/.clang-tidy
index 001c35f..3c736bb 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -139,6 +139,7 @@
 clang-analyzer-valist.ValistBase,
 clang-analyzer-webkit.NoUncountedMemberChecker,
 clang-analyzer-webkit.RefCntblBaseVirtualDtor,
+cppcoreguidelines-pro-type-reinterpret-cast,
 misc-misplaced-const,
 misc-redundant-expression,
 misc-static-assert,
diff --git a/tests/dsp/base.cpp b/tests/dsp/base.cpp
index c95abdf..5e71c80 100644
--- a/tests/dsp/base.cpp
+++ b/tests/dsp/base.cpp
@@ -200,6 +200,7 @@
     ver32_t version{0xff, 0xff, 0xff, 0xff};
     std::array<uint8_t, sizeof(pldm_msg_hdr) + PLDM_GET_COMMANDS_REQ_BYTES>
         requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_get_commands_req(0, pldmType, version, request);
@@ -221,6 +222,7 @@
     memcpy(requestMsg.data() + sizeof(pldmType) + hdrSize, &version,
            sizeof(version));
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
     auto rc = decode_get_commands_req(request, requestMsg.size() - hdrSize,
                                       &pldmTypeOut, &versionOut);
@@ -235,6 +237,7 @@
     uint8_t completionCode = 0;
     std::array<uint8_t, sizeof(pldm_msg_hdr) + PLDM_GET_COMMANDS_RESP_BYTES>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     std::array<bitfield8_t, PLDM_MAX_CMDS_PER_TYPE / 8> commands{};
     commands[0].byte = 1;
@@ -258,6 +261,7 @@
     uint8_t completionCode = 0;
     std::array<uint8_t, sizeof(pldm_msg_hdr) + PLDM_GET_TYPES_RESP_BYTES>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     std::array<bitfield8_t, PLDM_MAX_TYPES / 8> types{};
     types[0].byte = 1;
@@ -285,6 +289,7 @@
     uint8_t completion_code;
     responseMsg[hdrSize] = PLDM_SUCCESS;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = decode_get_types_resp(response, responseMsg.size() - hdrSize,
@@ -308,6 +313,7 @@
     uint8_t retcompletion_code = 0;
     responseMsg[hdrSize] = PLDM_SUCCESS;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = decode_get_types_resp(response, responseMsg.size() - hdrSize - 1,
@@ -327,6 +333,7 @@
     uint8_t completion_code;
     responseMsg[hdrSize] = PLDM_SUCCESS;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = decode_get_commands_resp(response, responseMsg.size() - hdrSize,
@@ -350,6 +357,7 @@
     uint8_t retcompletion_code = 0;
     responseMsg[hdrSize] = PLDM_SUCCESS;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc =
@@ -363,6 +371,7 @@
 {
     std::array<uint8_t, sizeof(pldm_msg_hdr) + PLDM_GET_VERSION_REQ_BYTES>
         requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
     uint8_t pldmType = 0x03;
     uint32_t transferHandle = 0x0;
@@ -399,6 +408,7 @@
     uint8_t flag = PLDM_START_AND_END;
     std::array<uint8_t, sizeof(pldm_msg_hdr) + PLDM_GET_VERSION_RESP_BYTES>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     ver32_t version = {0xff, 0xff, 0xff, 0xff};
 
@@ -434,6 +444,7 @@
     memcpy(requestMsg.data() + sizeof(transferHandle) + sizeof(flag) + hdrSize,
            &pldmType, sizeof(pldmType));
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = decode_get_version_req(request, requestMsg.size() - hdrSize,
@@ -467,6 +478,7 @@
                sizeof(transferHandle) + sizeof(flag) + hdrSize,
            &version, sizeof(version));
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = decode_get_version_resp(response, responseMsg.size() - hdrSize,
@@ -495,6 +507,7 @@
     uint8_t completionCode = 0;
     std::array<uint8_t, sizeof(pldm_msg_hdr) + PLDM_GET_TID_RESP_BYTES>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     uint8_t tid = 1;
 
@@ -514,6 +527,7 @@
     uint8_t completion_code;
     responseMsg[hdrSize] = PLDM_SUCCESS;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = decode_get_tid_resp(response, responseMsg.size() - hdrSize,
@@ -555,6 +569,7 @@
     std::memcpy(req.data(), &hdr, sizeof(hdr));
     std::memcpy(req.data() + sizeof(hdr), &req_pkt, sizeof(req_pkt));
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* pldm_request = reinterpret_cast<pldm_msg*>(req.data());
     int rc = decode_multipart_receive_req(
         pldm_request, req.size() - hdrSize, &pldm_type, &flag, &transfer_ctx,
@@ -599,6 +614,7 @@
     std::memcpy(req.data(), &hdr, sizeof(hdr));
     std::memcpy(req.data() + sizeof(hdr), &req_pkt, sizeof(req_pkt));
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* pldm_request = reinterpret_cast<pldm_msg*>(req.data());
     EXPECT_EQ(decode_multipart_receive_req(
                   pldm_request, (req.size() - hdrSize) + 1, &pldm_type, &flag,
@@ -630,6 +646,7 @@
     std::memcpy(req.data(), &hdr, sizeof(hdr));
     std::memcpy(req.data() + sizeof(hdr), &req_pkt, sizeof(req_pkt));
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* pldm_request = reinterpret_cast<pldm_msg*>(req.data());
     EXPECT_EQ(decode_multipart_receive_req(pldm_request, req.size() - hdrSize,
                                            &pldm_type, &flag, &transfer_ctx,
@@ -661,6 +678,7 @@
     std::memcpy(req.data(), &hdr, sizeof(hdr));
     std::memcpy(req.data() + sizeof(hdr), &req_pkt, sizeof(req_pkt));
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* pldm_request = reinterpret_cast<pldm_msg*>(req.data());
     EXPECT_EQ(decode_multipart_receive_req(pldm_request, req.size() - hdrSize,
                                            &pldm_type, &flag, &transfer_ctx,
@@ -696,6 +714,7 @@
     std::memcpy(req.data(), &hdr, sizeof(hdr));
     std::memcpy(req.data() + sizeof(hdr), &req_pkt, sizeof(req_pkt));
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* pldm_request = reinterpret_cast<pldm_msg*>(req.data());
     EXPECT_EQ(decode_multipart_receive_req(pldm_request, req.size() - hdrSize,
                                            &pldm_type, &flag, &transfer_ctx,
@@ -731,6 +750,7 @@
     std::memcpy(req.data(), &hdr, sizeof(hdr));
     std::memcpy(req.data() + sizeof(hdr), &req_pkt, sizeof(req_pkt));
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* pldm_request = reinterpret_cast<pldm_msg*>(req.data());
     EXPECT_EQ(decode_multipart_receive_req(pldm_request, req.size() - hdrSize,
                                            &pldm_type, &flag, &transfer_ctx,
@@ -748,6 +768,7 @@
                             3 /*completion code*/, &responseMsg);
     EXPECT_EQ(rc, PLDM_SUCCESS);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto p = reinterpret_cast<uint8_t*>(&responseMsg);
     EXPECT_THAT(std::vector<uint8_t>(p, p + sizeof(responseMsg)),
                 ElementsAreArray({0, 1, 2, 3}));
@@ -764,6 +785,7 @@
     uint8_t instanceId = 0;
     uint8_t tid = 0x01;
     std::array<uint8_t, sizeof(pldm_msg_hdr) + sizeof(tid)> requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_set_tid_req(instanceId, tid, request);
@@ -781,6 +803,7 @@
 {
     uint8_t tid = 0x01;
     std::array<uint8_t, sizeof(pldm_msg_hdr) + sizeof(tid)> requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_set_tid_req(0, tid, nullptr);
diff --git a/tests/dsp/bios.cpp b/tests/dsp/bios.cpp
index 3f64a2a..955bec6 100644
--- a/tests/dsp/bios.cpp
+++ b/tests/dsp/bios.cpp
@@ -33,6 +33,7 @@
     std::array<uint8_t, sizeof(pldm_msg_hdr) + PLDM_GET_DATE_TIME_RESP_BYTES>
         responseMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = encode_get_date_time_resp(0, PLDM_SUCCESS, seconds, minutes,
@@ -103,6 +104,7 @@
                hdrSize,
            &yearLe, sizeof(yearLe));
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = decode_get_date_time_resp(
@@ -126,6 +128,7 @@
     std::array<uint8_t, hdrSize + sizeof(struct pldm_only_cc_resp)>
         responseMsg{};
     struct pldm_msg* response =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_msg*>(responseMsg.data());
 
     auto rc = encode_set_date_time_resp(instanceId, completionCode, response,
@@ -133,6 +136,7 @@
     EXPECT_EQ(rc, PLDM_SUCCESS);
 
     struct pldm_only_cc_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_only_cc_resp*>(response->payload);
     EXPECT_EQ(completionCode, resp->completion_code);
 }
@@ -145,6 +149,7 @@
     std::array<uint8_t, hdrSize + sizeof(struct pldm_only_cc_resp)>
         responseMsg{};
     struct pldm_msg* response =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_msg*>(responseMsg.data());
     auto rc = encode_set_date_time_resp(instanceId, completionCode, nullptr,
                                         responseMsg.size() - hdrSize);
@@ -162,8 +167,10 @@
     std::array<uint8_t, hdrSize + sizeof(struct pldm_only_cc_resp)>
         responseMsg{};
     struct pldm_msg* response =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_msg*>(responseMsg.data());
     struct pldm_only_cc_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_only_cc_resp*>(response->payload);
 
     resp->completion_code = completionCode;
@@ -183,6 +190,7 @@
     std::array<uint8_t, hdrSize + sizeof(struct pldm_only_cc_resp)>
         responseMsg{};
     struct pldm_msg* response =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_msg*>(responseMsg.data());
     auto rc = decode_set_date_time_resp(nullptr, responseMsg.size() - hdrSize,
                                         &completionCode);
@@ -207,6 +215,7 @@
     std::array<uint8_t, hdrSize + sizeof(struct pldm_set_date_time_req)>
         requestMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
     auto rc = encode_set_date_time_req(instanceId, seconds, minutes, hours, day,
                                        month, year, request,
@@ -215,6 +224,7 @@
     EXPECT_EQ(rc, PLDM_SUCCESS);
 
     struct pldm_set_date_time_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_set_date_time_req*>(request->payload);
     EXPECT_EQ(seconds, bcd2dec8(req->seconds));
     EXPECT_EQ(minutes, bcd2dec8(req->minutes));
@@ -240,6 +250,7 @@
     std::array<uint8_t, hdrSize + sizeof(struct pldm_set_date_time_req)>
         requestMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_set_date_time_req(instanceId, seconds, minutes, hours, day,
@@ -269,8 +280,10 @@
     uint8_t month = 0x11;
     uint16_t year = 0x2019;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<struct pldm_msg*>(requestMsg.data());
     struct pldm_set_date_time_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_set_date_time_req*>(request->payload);
     req->seconds = seconds;
     req->minutes = minutes;
@@ -311,6 +324,7 @@
     std::array<uint8_t, hdrSize + sizeof(struct pldm_set_date_time_req)>
         requestMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<struct pldm_msg*>(requestMsg.data());
 
     decode_set_date_time_req(request, requestMsg.size() - hdrSize, &seconds,
@@ -336,6 +350,7 @@
     std::array<uint8_t,
                sizeof(pldm_msg_hdr) + PLDM_GET_BIOS_TABLE_MIN_RESP_BYTES + 4>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     uint8_t completionCode = PLDM_SUCCESS;
@@ -350,6 +365,7 @@
     EXPECT_EQ(rc, PLDM_SUCCESS);
 
     struct pldm_get_bios_table_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_bios_table_resp*>(response->payload);
 
     EXPECT_EQ(completionCode, resp->completion_code);
@@ -378,6 +394,7 @@
     uint8_t transferOpFlag = 0x01;
     uint8_t tableType = PLDM_BIOS_ATTR_TABLE;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
     auto rc = encode_get_bios_table_req(0, transferHandle, transferOpFlag,
                                         tableType, request);
@@ -385,6 +402,7 @@
     EXPECT_EQ(rc, PLDM_SUCCESS);
 
     struct pldm_get_bios_table_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_bios_table_req*>(request->payload);
     EXPECT_EQ(transferHandle, le32toh(req->transfer_handle));
     EXPECT_EQ(transferOpFlag, req->transfer_op_flag);
@@ -414,8 +432,10 @@
     uint8_t retTransferOpFlag = 0;
     uint8_t retTableType = 0;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto req = reinterpret_cast<pldm_msg*>(requestMsg.data());
     struct pldm_get_bios_table_req* request =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_bios_table_req*>(req->payload);
 
     request->transfer_handle = htole32(transferHandle);
@@ -442,8 +462,10 @@
     uint8_t retTransferOpFlag = 0;
     uint8_t retTableType = 0;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto req = reinterpret_cast<pldm_msg*>(requestMsg.data());
     struct pldm_get_bios_table_req* request =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_bios_table_req*>(req->payload);
 
     request->transfer_handle = htole32(transferHandle);
@@ -471,8 +493,10 @@
     uint8_t retTransferOpFlag = 0;
     uint8_t retTableType = 0;
 
+// NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto req = reinterpret_cast<pldm_msg*>(requestMsg.data());
     struct pldm_get_bios_table_req* request =
+// NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_bios_table_req*>(req->payload);
 
     request->transfer_handle = htole32(transferHandle);
@@ -498,8 +522,10 @@
                             sizeof(transferOpFlag) + sizeof(attributehandle)>
         requestMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto req = reinterpret_cast<pldm_msg*>(requestMsg.data());
     struct pldm_get_bios_attribute_current_value_by_handle_req* request =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<
             struct pldm_get_bios_attribute_current_value_by_handle_req*>(
             req->payload);
@@ -531,8 +557,10 @@
                             sizeof(transferOpFlag) + sizeof(attribute_handle)>
         requestMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto req = reinterpret_cast<pldm_msg*>(requestMsg.data());
     struct pldm_get_bios_attribute_current_value_by_handle_req* request =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<
             struct pldm_get_bios_attribute_current_value_by_handle_req*>(
             req->payload);
@@ -564,6 +592,7 @@
     uint8_t transferOpFlag = PLDM_GET_FIRSTPART;
     uint8_t attributeHandle = 10;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
     auto rc = encode_get_bios_attribute_current_value_by_handle_req(
         0, transferHandle, transferOpFlag, attributeHandle, request);
@@ -571,6 +600,7 @@
     EXPECT_EQ(rc, PLDM_SUCCESS);
 
     struct pldm_get_bios_attribute_current_value_by_handle_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<
             struct pldm_get_bios_attribute_current_value_by_handle_req*>(
             request->payload);
@@ -603,6 +633,7 @@
                hdrSize +
                    sizeof(pldm_get_bios_attribute_current_value_by_handle_resp)>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = encode_get_bios_current_value_by_handle_resp(
@@ -612,6 +643,7 @@
     EXPECT_EQ(rc, PLDM_SUCCESS);
 
     struct pldm_get_bios_attribute_current_value_by_handle_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<
             struct pldm_get_bios_attribute_current_value_by_handle_resp*>(
             response->payload);
@@ -638,6 +670,7 @@
                hdrSize +
                    sizeof(pldm_get_bios_attribute_current_value_by_handle_resp)>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     rc = encode_get_bios_current_value_by_handle_resp(
         0, PLDM_SUCCESS, nextTransferHandle, transferFlag, nullptr,
@@ -654,15 +687,18 @@
     std::array<uint8_t, hdrSize + PLDM_SET_BIOS_ATTR_CURR_VAL_MIN_REQ_BYTES +
                             sizeof(attributeData)>
         requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
     auto rc = encode_set_bios_attribute_current_value_req(
         instanceId, transferHandle, transferFlag,
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(&attributeData), sizeof(attributeData),
         request, requestMsg.size() - hdrSize);
 
     EXPECT_EQ(rc, PLDM_SUCCESS);
 
     struct pldm_set_bios_attribute_current_value_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_set_bios_attribute_current_value_req*>(
             request->payload);
     EXPECT_EQ(htole32(transferHandle), req->transfer_handle);
@@ -679,6 +715,7 @@
     uint32_t attributeData = 44;
     std::array<uint8_t, hdrSize + PLDM_SET_BIOS_ATTR_CURR_VAL_MIN_REQ_BYTES>
         requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_set_bios_attribute_current_value_req(
@@ -686,6 +723,7 @@
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_DATA);
     rc = encode_set_bios_attribute_current_value_req(
         instanceId, transferHandle, transferFlag,
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(&attributeData), sizeof(attributeData),
         request, requestMsg.size() - hdrSize);
 
@@ -701,8 +739,10 @@
     std::array<uint8_t, hdrSize + PLDM_SET_BIOS_ATTR_CURR_VAL_MIN_REQ_BYTES +
                             sizeof(attributeData)>
         requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<struct pldm_msg*>(requestMsg.data());
     struct pldm_set_bios_attribute_current_value_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_set_bios_attribute_current_value_req*>(
             request->payload);
     req->transfer_handle = htole32(transferHandle);
@@ -730,6 +770,7 @@
     struct variable_field attribute;
     std::array<uint8_t, hdrSize + PLDM_SET_BIOS_ATTR_CURR_VAL_MIN_REQ_BYTES - 1>
         requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<struct pldm_msg*>(requestMsg.data());
 
     auto rc = decode_set_bios_attribute_current_value_req(
@@ -750,12 +791,14 @@
     std::array<uint8_t, hdrSize + PLDM_SET_BIOS_ATTR_CURR_VAL_RESP_BYTES>
         responseMsg{};
     struct pldm_msg* response =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_msg*>(responseMsg.data());
     auto rc = encode_set_bios_attribute_current_value_resp(
         instanceId, completionCode, nextTransferHandle, response);
     EXPECT_EQ(rc, PLDM_SUCCESS);
 
     struct pldm_set_bios_attribute_current_value_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_set_bios_attribute_current_value_resp*>(
             response->payload);
     EXPECT_EQ(completionCode, resp->completion_code);
@@ -779,8 +822,10 @@
     std::array<uint8_t, hdrSize + PLDM_SET_BIOS_ATTR_CURR_VAL_RESP_BYTES>
         responseMsg{};
     struct pldm_msg* response =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_msg*>(responseMsg.data());
     struct pldm_set_bios_attribute_current_value_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_set_bios_attribute_current_value_resp*>(
             response->payload);
 
@@ -806,8 +851,10 @@
     std::array<uint8_t, hdrSize + PLDM_SET_BIOS_ATTR_CURR_VAL_RESP_BYTES>
         responseMsg{};
     struct pldm_msg* response =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_msg*>(responseMsg.data());
     struct pldm_set_bios_attribute_current_value_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_set_bios_attribute_current_value_resp*>(
             response->payload);
 
@@ -834,9 +881,11 @@
     std::array<uint8_t, hdrSize + PLDM_GET_BIOS_TABLE_MIN_RESP_BYTES>
         responseMsg{};
     struct pldm_msg* response =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_msg*>(responseMsg.data());
 
     struct pldm_get_bios_table_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_bios_table_resp*>(response->payload);
 
     resp->completion_code = completionCode;
@@ -872,9 +921,11 @@
                    sizeof(attributeData)>
         responseMsg{};
     struct pldm_msg* response =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_msg*>(responseMsg.data());
 
     struct pldm_get_bios_attribute_current_value_by_handle_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<
             struct pldm_get_bios_attribute_current_value_by_handle_resp*>(
             response->payload);
@@ -911,15 +962,18 @@
     std::array<uint8_t,
                hdrSize + PLDM_SET_BIOS_TABLE_MIN_REQ_BYTES + sizeof(tableData)>
         requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
     auto rc = encode_set_bios_table_req(
         instanceId, transferHandle, transferFlag, tableType,
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(&tableData), sizeof(tableData), request,
         requestMsg.size() - hdrSize);
 
     EXPECT_EQ(rc, PLDM_SUCCESS);
 
     struct pldm_set_bios_table_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_set_bios_table_req*>(request->payload);
 
     EXPECT_EQ(htole32(transferHandle), req->transfer_handle);
@@ -938,6 +992,7 @@
     std::array<uint8_t,
                hdrSize + PLDM_SET_BIOS_TABLE_MIN_REQ_BYTES + sizeof(tableData)>
         requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_set_bios_table_req(
@@ -947,6 +1002,7 @@
 
     rc = encode_set_bios_table_req(
         instanceId, transferHandle, transferFlag, tableType,
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(&tableData), sizeof(tableData), request,
         requestMsg.size() - hdrSize + 1);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_LENGTH);
@@ -958,8 +1014,10 @@
     uint8_t completionCode = PLDM_SUCCESS;
     std::array<uint8_t, hdrSize + PLDM_SET_BIOS_TABLE_RESP_BYTES> responseMsg{};
     struct pldm_msg* response =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_msg*>(responseMsg.data());
     struct pldm_set_bios_table_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_set_bios_table_resp*>(response->payload);
 
     resp->completion_code = completionCode;
@@ -982,8 +1040,10 @@
     uint8_t completionCode = PLDM_SUCCESS;
     std::array<uint8_t, hdrSize + PLDM_SET_BIOS_TABLE_RESP_BYTES> responseMsg{};
     struct pldm_msg* response =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_msg*>(responseMsg.data());
     struct pldm_set_bios_table_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_set_bios_table_resp*>(response->payload);
 
     resp->completion_code = completionCode;
@@ -1009,12 +1069,14 @@
 
     std::array<uint8_t, hdrSize + PLDM_SET_BIOS_TABLE_RESP_BYTES> responseMsg{};
     struct pldm_msg* response =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_msg*>(responseMsg.data());
     auto rc = encode_set_bios_table_resp(instanceId, completionCode,
                                          nextTransferHandle, response);
     EXPECT_EQ(rc, PLDM_SUCCESS);
 
     struct pldm_set_bios_table_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_set_bios_table_resp*>(response->payload);
     EXPECT_EQ(completionCode, resp->completion_code);
     EXPECT_EQ(htole32(nextTransferHandle), resp->next_transfer_handle);
@@ -1036,8 +1098,10 @@
     std::array<uint8_t,
                hdrSize + PLDM_SET_BIOS_TABLE_MIN_REQ_BYTES + sizeof(tableData)>
         requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<struct pldm_msg*>(requestMsg.data());
     struct pldm_set_bios_table_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_set_bios_table_req*>(request->payload);
     req->transfer_handle = htole32(transferHandle);
     req->transfer_flag = transferFlag;
@@ -1070,8 +1134,10 @@
     std::array<uint8_t,
                hdrSize + PLDM_SET_BIOS_TABLE_MIN_REQ_BYTES + sizeof(tableData)>
         requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<struct pldm_msg*>(requestMsg.data());
     struct pldm_set_bios_table_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_set_bios_table_req*>(request->payload);
     req->transfer_handle = htole32(transferHandle);
     req->transfer_flag = transferFlag;
diff --git a/tests/dsp/bios_table.cpp b/tests/dsp/bios_table.cpp
index 99e17ba..19fb929 100644
--- a/tests/dsp/bios_table.cpp
+++ b/tests/dsp/bios_table.cpp
@@ -49,6 +49,7 @@
         0     /* default value string handle index */
     };
     auto entry =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_bios_attr_table_entry*>(enumEntry.data());
     auto attrHandle = pldm_bios_table_attr_entry_decode_attribute_handle(entry);
     EXPECT_EQ(attrHandle, 2);
@@ -72,6 +73,7 @@
     };
 
     auto entry =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_bios_attr_table_entry*>(enumEntry.data());
     uint8_t pvNumber;
     ASSERT_EQ(pldm_bios_table_attr_entry_enum_decode_pv_num(entry, &pvNumber),
@@ -201,6 +203,7 @@
         'a', 'b', 'c' /* default string  */
     };
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto entry = reinterpret_cast<struct pldm_bios_attr_table_entry*>(
         stringEntry.data());
     auto stringType =
@@ -416,6 +419,7 @@
     uint64_t upper;
     uint64_t def;
     uint32_t scalar;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto entry = reinterpret_cast<struct pldm_bios_attr_table_entry*>(
         integerEntry.data());
     pldm_bios_table_attr_entry_integer_decode(entry, &lower, &upper, &scalar,
@@ -526,6 +530,7 @@
     auto entry =
         pldm_bios_table_attr_find_by_handle(table.data(), table.size(), 1);
     EXPECT_NE(entry, nullptr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto p = reinterpret_cast<const uint8_t*>(entry);
     EXPECT_THAT(std::vector<uint8_t>(p, p + stringEntry.size()),
                 ElementsAreArray(stringEntry));
@@ -536,6 +541,7 @@
     entry = pldm_bios_table_attr_find_by_string_handle(table.data(),
                                                        table.size(), 2);
     EXPECT_NE(entry, nullptr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     p = reinterpret_cast<const uint8_t*>(entry);
     EXPECT_THAT(std::vector<uint8_t>(p, p + stringEntry.size()),
                 ElementsAreArray(stringEntry));
@@ -554,6 +560,7 @@
         0,    /* current value string handle index */
         1,    /* current value string handle index */
     };
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto entry = reinterpret_cast<struct pldm_bios_attr_val_table_entry*>(
         enumEntry.data());
     auto attrHandle =
@@ -592,6 +599,7 @@
         handles);
     EXPECT_EQ(rc, PLDM_SUCCESS);
     EXPECT_EQ(encodeEntry, enumEntry);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto entry = reinterpret_cast<struct pldm_bios_attr_val_table_entry*>(
         enumEntry.data());
     entry->attr_type = PLDM_BIOS_ENUMERATION_READ_ONLY;
@@ -620,6 +628,7 @@
         1,    /* current value string handle index */
     };
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto entry = reinterpret_cast<struct pldm_bios_attr_val_table_entry*>(
         enumEntry.data());
     auto number = pldm_bios_table_attr_value_entry_enum_decode_number(entry);
@@ -673,6 +682,7 @@
         encodeEntry.data(), encodeEntry.size(), 0, PLDM_BIOS_STRING, 3, "abc");
     EXPECT_EQ(rc, PLDM_SUCCESS);
     EXPECT_EQ(encodeEntry, stringEntry);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto entry = reinterpret_cast<struct pldm_bios_attr_val_table_entry*>(
         stringEntry.data());
     entry->attr_type = PLDM_BIOS_STRING_READ_ONLY;
@@ -700,6 +710,7 @@
         'a', 'b', 'c', /* default value string handle index */
     };
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto entry = reinterpret_cast<struct pldm_bios_attr_val_table_entry*>(
         stringEntry.data());
     auto length = pldm_bios_table_attr_value_entry_string_decode_length(entry);
@@ -745,6 +756,7 @@
         encodeEntry.data(), encodeEntry.size(), 0, PLDM_BIOS_INTEGER, 10);
     EXPECT_EQ(rc, PLDM_SUCCESS);
     EXPECT_EQ(encodeEntry, integerEntry);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto entry = reinterpret_cast<struct pldm_bios_attr_val_table_entry*>(
         integerEntry.data());
     entry->attr_type = PLDM_BIOS_INTEGER_READ_ONLY;
@@ -771,6 +783,7 @@
         10, 0, 0, 0, 0, 0, 0, 0, /* current value */
     };
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto entry = reinterpret_cast<struct pldm_bios_attr_val_table_entry*>(
         integerEntry.data());
     auto cv = pldm_bios_table_attr_value_entry_integer_decode_cv(entry);
@@ -805,24 +818,28 @@
                                             PLDM_BIOS_ATTR_VAL_TABLE);
     auto entry = pldm_bios_table_iter_attr_value_entry_value(iter);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto p = reinterpret_cast<const uint8_t*>(entry);
     EXPECT_THAT(std::vector<uint8_t>(p, p + enumEntry.size()),
                 ElementsAreArray(enumEntry));
 
     pldm_bios_table_iter_next(iter);
     entry = pldm_bios_table_iter_attr_value_entry_value(iter);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     p = reinterpret_cast<const uint8_t*>(entry);
     EXPECT_THAT(std::vector<uint8_t>(p, p + stringEntry.size()),
                 ElementsAreArray(stringEntry));
 
     pldm_bios_table_iter_next(iter);
     entry = pldm_bios_table_iter_attr_value_entry_value(iter);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     p = reinterpret_cast<const uint8_t*>(entry);
     EXPECT_THAT(std::vector<uint8_t>(p, p + integerEntry.size()),
                 ElementsAreArray(integerEntry));
 
     pldm_bios_table_iter_next(iter);
     entry = pldm_bios_table_iter_attr_value_entry_value(iter);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     p = reinterpret_cast<const uint8_t*>(entry);
     EXPECT_THAT(std::vector<uint8_t>(p, p + enumEntry.size()),
                 ElementsAreArray(enumEntry));
@@ -860,6 +877,7 @@
     auto entry = pldm_bios_table_attr_value_find_by_handle(table.data(),
                                                            table.size(), 1);
     EXPECT_NE(entry, nullptr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto p = reinterpret_cast<const uint8_t*>(entry);
     EXPECT_THAT(std::vector<uint8_t>(p, p + stringEntry.size()),
                 ElementsAreArray(stringEntry));
@@ -869,6 +887,7 @@
     EXPECT_EQ(entry, nullptr);
 
     auto firstEntry =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_bios_attr_val_table_entry*>(table.data());
     firstEntry->attr_type = PLDM_BIOS_PASSWORD;
 #ifdef NDEBUG
@@ -1015,6 +1034,7 @@
         7,   0,                            /* string length */
         'A', 'l', 'l', 'o', 'w', 'e', 'd', /* string */
     };
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto entry = reinterpret_cast<struct pldm_bios_string_table_entry*>(
         stringEntry.data());
     auto handle = pldm_bios_table_string_entry_decode_handle(entry);
@@ -1128,6 +1148,7 @@
 
     /* first entry */
     auto attr_entry =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_bios_attr_table_entry*>(table.data());
     auto iter = pldm_bios_table_iter_create(table.data(), table.size(),
                                             PLDM_BIOS_ATTR_TABLE);
diff --git a/tests/dsp/firmware_update.cpp b/tests/dsp/firmware_update.cpp
index e21daf0..8f3ab3c 100644
--- a/tests/dsp/firmware_update.cpp
+++ b/tests/dsp/firmware_update.cpp
@@ -67,6 +67,7 @@
     EXPECT_EQ(pkgHeader.package_version_string_length,
               packageVersionStr.size());
     std::string packageVersionString(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const char*>(packageVersion.ptr),
         packageVersion.length);
     EXPECT_EQ(packageVersionString, packageVersionStr);
@@ -220,6 +221,7 @@
 
     EXPECT_EQ(outCompImageSetVersionStr.length, imageSetVersionStr.size());
     std::string compImageSetVersionStr(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const char*>(outCompImageSetVersionStr.ptr),
         outCompImageSetVersionStr.length);
     EXPECT_EQ(compImageSetVersionStr, imageSetVersionStr);
@@ -310,6 +312,7 @@
 
     EXPECT_EQ(outCompImageSetVersionStr.length, imageSetVersionStr.size());
     std::string compImageSetVersionStr(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const char*>(outCompImageSetVersionStr.ptr),
         outCompImageSetVersionStr.length);
     EXPECT_EQ(compImageSetVersionStr, imageSetVersionStr);
@@ -517,6 +520,7 @@
             EXPECT_EQ(descriptorTitleStrType, PLDM_STR_TYPE_ASCII);
             EXPECT_EQ(descriptorTitleStr.length, vendorTitle.size());
             std::string vendorTitleStr(
+                // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
                 reinterpret_cast<const char*>(descriptorTitleStr.ptr),
                 descriptorTitleStr.length);
             EXPECT_EQ(vendorTitleStr, vendorTitle);
@@ -694,6 +698,7 @@
     EXPECT_EQ(outCompVersionStr.length,
               outCompImageInfo.comp_version_string_length);
     std::string componentVersionString(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const char*>(outCompVersionStr.ptr),
         outCompVersionStr.length);
     EXPECT_EQ(componentVersionString, compVersionStr);
@@ -790,6 +795,7 @@
 TEST(QueryDeviceIdentifiers, goodPathEncodeRequest)
 {
     std::array<uint8_t, sizeof(pldm_msg_hdr)> requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     uint8_t instanceId = 0x01;
@@ -811,6 +817,7 @@
                             sizeof(struct pldm_query_device_identifiers_resp) +
                             descriptorDataLen>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto inResp = reinterpret_cast<struct pldm_query_device_identifiers_resp*>(
         responseMsg.data() + hdrSize);
 
@@ -823,6 +830,7 @@
                     sizeof(struct pldm_query_device_identifiers_resp),
                 descriptorDataLen, 0xff);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     uint8_t completionCode = PLDM_SUCCESS;
     uint32_t deviceIdentifiersLen = 0;
@@ -848,6 +856,7 @@
 TEST(GetFirmwareParameters, goodPathEncodeRequest)
 {
     std::array<uint8_t, sizeof(pldm_msg_hdr)> requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
     uint8_t instanceId = 0x01;
 
@@ -913,6 +922,7 @@
             0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x34};
 
     auto responseMsg =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(getFwParamsResponse.data());
     pldm_get_firmware_parameters_resp outResp{};
     variable_field outActiveCompImageSetVersion{};
@@ -935,10 +945,12 @@
     EXPECT_EQ(outResp.pending_comp_image_set_ver_str_len,
               pendingCompImageSetVersion.size());
     std::string activeCompImageSetVersionStr(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const char*>(outActiveCompImageSetVersion.ptr),
         outActiveCompImageSetVersion.length);
     EXPECT_EQ(activeCompImageSetVersionStr, activeCompImageSetVersion);
     std::string pendingCompImageSetVersionStr(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const char*>(outPendingCompImageSetVersion.ptr),
         outPendingCompImageSetVersion.length);
     EXPECT_EQ(pendingCompImageSetVersionStr, pendingCompImageSetVersion);
@@ -971,6 +983,7 @@
             0x6f, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x32};
 
     auto responseMsg =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(getFwParamsResponse.data());
     pldm_get_firmware_parameters_resp outResp{};
     variable_field outActiveCompImageSetVersion{};
@@ -993,10 +1006,12 @@
     EXPECT_EQ(outResp.pending_comp_image_set_ver_str_len,
               pendingCompImageSetVersion.size());
     std::string activeCompImageSetVersionStr(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const char*>(outActiveCompImageSetVersion.ptr),
         outActiveCompImageSetVersion.length);
     EXPECT_EQ(activeCompImageSetVersionStr, activeCompImageSetVersion);
     std::string pendingCompImageSetVersionStr(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const char*>(outPendingCompImageSetVersion.ptr),
         outPendingCompImageSetVersion.length);
     EXPECT_EQ(pendingCompImageSetVersionStr, pendingCompImageSetVersion);
@@ -1025,6 +1040,7 @@
                             0x53, 0x74, 0x72, 0x69, 0x6e, 0x67};
 
     auto responseMsg =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(getFwParamsResponse.data());
     pldm_get_firmware_parameters_resp outResp{};
     variable_field outActiveCompImageSetVersion{};
@@ -1047,6 +1063,7 @@
               PLDM_STR_TYPE_UNKNOWN);
     EXPECT_EQ(outResp.pending_comp_image_set_ver_str_len, 0);
     std::string activeCompImageSetVersionStr(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const char*>(outActiveCompImageSetVersion.ptr),
         outActiveCompImageSetVersion.length);
     EXPECT_EQ(activeCompImageSetVersionStr, activeCompImageSetVersion);
@@ -1062,6 +1079,7 @@
         getFwParamsResponse{0x00, 0x00, 0x00, 0x01};
 
     auto responseMsg =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(getFwParamsResponse.data());
     pldm_get_firmware_parameters_resp outResp{};
     variable_field outActiveCompImageSetVersion{};
@@ -1086,6 +1104,7 @@
         0x00, 0x00, 0x00, 0x06, 0x0e, 0x00, 0x00};
 
     auto responseMsg =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(invalidGetFwParamsResponse1.data());
     pldm_get_firmware_parameters_resp outResp{};
     variable_field outActiveCompImageSetVersion{};
@@ -1141,6 +1160,7 @@
         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
         0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00};
     responseMsg =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(invalidGetFwParamsResponse2.data());
     rc = decode_get_firmware_parameters_resp(
         responseMsg, invalidGetFwParamsResponse2.size() - hdrSize, &outResp,
@@ -1154,6 +1174,7 @@
         0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
         0x00, 0x00, 0x00, 0x01, 0x0e, 0x01, 0x00};
     responseMsg =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(invalidGetFwParamsResponse3.data());
     rc = decode_get_firmware_parameters_resp(
         responseMsg, invalidGetFwParamsResponse3.size() - hdrSize, &outResp,
@@ -1167,6 +1188,7 @@
         0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
         0x00, 0x00, 0x00, 0x01, 0x0e, 0x06, 0x0e};
     responseMsg =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(invalidGetFwParamsResponse4.data());
     rc = decode_get_firmware_parameters_resp(
         responseMsg, invalidGetFwParamsResponse4.size() - hdrSize, &outResp,
@@ -1179,6 +1201,7 @@
         0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
         0x00, 0x00, 0x00, 0x01, 0x0e, 0x01, 0x0e};
     responseMsg =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(invalidGetFwParamsResponse5.data());
     rc = decode_get_firmware_parameters_resp(
         responseMsg, invalidGetFwParamsResponse5.size() - hdrSize, &outResp,
@@ -1210,6 +1233,7 @@
     std::array<uint8_t, entryLength> entry{};
 
     auto inEntry =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_component_parameter_entry*>(entry.data());
 
     inEntry->comp_classification = htole16(compClassification);
@@ -1283,6 +1307,7 @@
 {
     constexpr uint8_t instanceId = 1;
     std::array<uint8_t, sizeof(pldm_msg_hdr)> requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_query_downstream_devices_req(instanceId, requestPtr);
@@ -1336,6 +1361,7 @@
     pldm_msgbuf_insert_uint16(buf, max_number_of_downstream_devices_resp);
     pldm_msgbuf_insert_uint32(buf, capabilities_resp.value);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_query_downstream_devices_resp resp_data;
 
@@ -1383,6 +1409,7 @@
     pldm_msgbuf_insert_uint16(buf, max_number_of_downstream_devices_resp);
     pldm_msgbuf_insert_uint32(buf, capabilities_resp.value);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_query_downstream_devices_resp resp_data;
 
@@ -1425,6 +1452,7 @@
     // Inject error value
     pldm_msgbuf_insert_uint16(buf, (uint16_t)capabilities_resp.value);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_query_downstream_devices_resp resp_data;
 
@@ -1444,6 +1472,7 @@
     constexpr size_t payload_length =
         PLDM_QUERY_DOWNSTREAM_IDENTIFIERS_REQ_BYTES;
     std::array<uint8_t, hdrSize + payload_length> requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_query_downstream_identifiers_req(
@@ -1468,6 +1497,7 @@
     constexpr size_t payload_length =
         PLDM_QUERY_DOWNSTREAM_IDENTIFIERS_REQ_BYTES;
     std::array<uint8_t, hdrSize + payload_length> requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_query_downstream_identifiers_req(
@@ -1524,6 +1554,7 @@
                     PLDM_QUERY_DOWNSTREAM_IDENTIFIERS_RESP_MIN_LEN,
                 downstreamDevicesLen, 0xff);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_query_downstream_identifiers_resp resp_data = {};
     struct variable_field downstreamDevices = {};
@@ -1554,6 +1585,7 @@
 TEST(QueryDownstreamIdentifiers, decodeRequestErrorPaths)
 {
     std::array<uint8_t, hdrSize + sizeof(uint8_t)> responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_query_downstream_identifiers_resp resp_data = {};
     struct variable_field downstreamDevices = {};
@@ -1616,6 +1648,7 @@
                     PLDM_QUERY_DOWNSTREAM_IDENTIFIERS_RESP_MIN_LEN,
                 actualDownstreamDevicesLen, 0xff);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_query_downstream_identifiers_resp resp_data = {};
     struct variable_field downstreamDevices = {};
@@ -1673,6 +1706,7 @@
     // Inject error buffer size
     pldm_msgbuf_insert_uint8(buf, (uint8_t)number_of_downstream_devices_resp);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_query_downstream_identifiers_resp resp_data = {};
     struct variable_field downstreamDevices = {};
@@ -1693,6 +1727,7 @@
     constexpr size_t payload_length =
         PLDM_GET_DOWNSTREAM_FIRMWARE_PARAMS_REQ_BYTES;
     std::array<uint8_t, sizeof(pldm_msg_hdr) + payload_length> requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_get_downstream_firmware_params_req(
@@ -1717,6 +1752,7 @@
     constexpr size_t payload_length =
         PLDM_GET_DOWNSTREAM_FIRMWARE_PARAMS_REQ_BYTES;
     std::array<uint8_t, sizeof(pldm_msg_hdr) + payload_length> requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_get_downstream_firmware_params_req(
@@ -1739,6 +1775,7 @@
         1 /* inject erro length*/;
 
     std::array<uint8_t, sizeof(pldm_msg_hdr) + payload_length> requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_get_downstream_firmware_params_req(
@@ -1791,12 +1828,14 @@
     std::fill_n(responseMsg.data() + hdrSize +
                     PLDM_GET_DOWNSTREAM_FIRMWARE_PARAMS_RESP_MIN_LEN,
                 downstreamDeviceParamTableLen, 0xff);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto table = reinterpret_cast<pldm_component_parameter_entry*>(
         responseMsg.data() + hdrSize +
         PLDM_GET_DOWNSTREAM_FIRMWARE_PARAMS_RESP_MIN_LEN);
     table->active_comp_ver_str_len = activeComponentVersionStringLength;
     table->pending_comp_ver_str_len = pendingComponentVersionStringLength;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_get_downstream_firmware_params_resp resp_data = {};
     struct variable_field downstreamDeviceParamTable = {};
@@ -1867,6 +1906,7 @@
                 downstreamDeviceParamTableLen - 1 /* inject error length*/,
                 0xff);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_get_downstream_firmware_params_resp resp_data = {};
     struct variable_field downstreamDeviceParamTable = {};
@@ -2030,6 +2070,7 @@
     constexpr char versionsStr[] = {'1', '2', '3', '4', '5', '6', '7', '8',
                                     'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'};
     const struct variable_field versions = {
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         .ptr = reinterpret_cast<const uint8_t*>(versionsStr),
         .length = sizeof(versionsStr)};
 
@@ -2068,6 +2109,7 @@
     constexpr char versionsStr[] = {'1', '2', '3', '4', '5', '6', '7', '8',
                                     'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'};
     const struct variable_field versions = {
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         .ptr = reinterpret_cast<const uint8_t*>(versionsStr),
         .length = sizeof(versionsStr)};
 
@@ -2090,6 +2132,7 @@
     constexpr char versionsStr[] = {'1', '2', '3', '4', '5', '6', '7', '8',
                                     'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'};
     const struct variable_field versions = {
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         .ptr = reinterpret_cast<const uint8_t*>(versionsStr),
         .length = sizeof(versionsStr) - 1 // Inject error length
     };
@@ -2118,12 +2161,14 @@
         static_cast<uint8_t>(compImgSetVerStr.size());
     variable_field compImgSetVerStrInfo{};
     compImgSetVerStrInfo.ptr =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const uint8_t*>(compImgSetVerStr.data());
     compImgSetVerStrInfo.length = compImgSetVerStrLen;
 
     std::array<uint8_t, hdrSize + sizeof(struct pldm_request_update_req) +
                             compImgSetVerStrLen>
         request{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestMsg = reinterpret_cast<pldm_msg*>(request.data());
 
     auto rc = encode_request_update_req(
@@ -2152,12 +2197,14 @@
     uint8_t compImgSetVerStrLen = static_cast<uint8_t>(compImgSetVerStr.size());
     variable_field compImgSetVerStrInfo{};
     compImgSetVerStrInfo.ptr =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const uint8_t*>(compImgSetVerStr.data());
     compImgSetVerStrInfo.length = compImgSetVerStrLen;
 
     std::array<uint8_t, hdrSize + sizeof(struct pldm_request_update_req) +
                             compImgSetVerStr.size()>
         request{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestMsg = reinterpret_cast<pldm_msg*>(request.data());
 
     auto rc = encode_request_update_req(
@@ -2175,6 +2222,7 @@
         sizeof(struct pldm_request_update_req) + compImgSetVerStrLen);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_DATA);
     compImgSetVerStrInfo.ptr =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const uint8_t*>(compImgSetVerStr.data());
 
     rc = encode_request_update_req(
@@ -2241,6 +2289,7 @@
         requestUpdateResponse1{0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01};
 
     auto responseMsg1 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(requestUpdateResponse1.data());
     uint8_t outCompletionCode = 0;
     uint16_t outFdMetaDataLen = 0;
@@ -2261,6 +2310,7 @@
     constexpr std::array<uint8_t, hdrSize + sizeof(outCompletionCode)>
         requestUpdateResponse2{0x00, 0x00, 0x00, 0x81};
     auto responseMsg2 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(requestUpdateResponse2.data());
     rc = decode_request_update_resp(
         responseMsg2, requestUpdateResponse2.size() - hdrSize,
@@ -2276,6 +2326,7 @@
         requestUpdateResponse{0x00, 0x00, 0x00, 0x00, 0x00, 0x04};
 
     auto responseMsg =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(requestUpdateResponse.data());
     uint8_t outCompletionCode = 0;
     uint16_t outFdMetaDataLen = 0;
@@ -2320,12 +2371,14 @@
     constexpr std::string_view compVerStr = "0penBmcv1.1";
     constexpr uint8_t compVerStrLen = static_cast<uint8_t>(compVerStr.size());
     variable_field compVerStrInfo{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     compVerStrInfo.ptr = reinterpret_cast<const uint8_t*>(compVerStr.data());
     compVerStrInfo.length = compVerStrLen;
 
     std::array<uint8_t,
                hdrSize + sizeof(pldm_pass_component_table_req) + compVerStrLen>
         request{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestMsg = reinterpret_cast<pldm_msg*>(request.data());
 
     auto rc = encode_pass_component_table_req(
@@ -2352,12 +2405,14 @@
     constexpr std::string_view compVerStr = "0penBmcv1.1";
     constexpr uint8_t compVerStrLen = static_cast<uint8_t>(compVerStr.size());
     variable_field compVerStrInfo{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     compVerStrInfo.ptr = reinterpret_cast<const uint8_t*>(compVerStr.data());
     compVerStrInfo.length = compVerStrLen;
 
     std::array<uint8_t,
                hdrSize + sizeof(pldm_pass_component_table_req) + compVerStrLen>
         request{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestMsg = reinterpret_cast<pldm_msg*>(request.data());
 
     auto rc = encode_pass_component_table_req(
@@ -2374,6 +2429,7 @@
         compVerStrLen, &compVerStrInfo, requestMsg,
         sizeof(pldm_pass_component_table_req) + compVerStrLen);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_DATA);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     compVerStrInfo.ptr = reinterpret_cast<const uint8_t*>(compVerStr.data());
 
     rc = encode_pass_component_table_req(
@@ -2425,6 +2481,7 @@
                          hdrSize + sizeof(pldm_pass_component_table_resp)>
         passCompTableResponse1{0x00, 0x00, 0x00, 0x00, 0x00, 0x01};
     auto responseMsg1 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(passCompTableResponse1.data());
 
     uint8_t completionCode = 0;
@@ -2444,6 +2501,7 @@
                          hdrSize + sizeof(pldm_pass_component_table_resp)>
         passCompTableResponse2{0x00, 0x00, 0x00, 0x00, 0x00, 0xd0};
     auto responseMsg2 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(passCompTableResponse2.data());
     rc = decode_pass_component_table_resp(
         responseMsg2, sizeof(pldm_pass_component_table_resp), &completionCode,
@@ -2458,6 +2516,7 @@
                          hdrSize + sizeof(pldm_pass_component_table_resp)>
         passCompTableResponse3{0x00, 0x00, 0x00, 0x80};
     auto responseMsg3 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(passCompTableResponse3.data());
 
     rc = decode_pass_component_table_resp(
@@ -2474,6 +2533,7 @@
                          hdrSize + sizeof(pldm_pass_component_table_resp) - 1>
         passCompTableResponse1{0x00, 0x00, 0x00, 0x00, 0x00};
     auto responseMsg1 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(passCompTableResponse1.data());
 
     uint8_t completionCode = 0;
@@ -2513,6 +2573,7 @@
                          hdrSize + sizeof(pldm_pass_component_table_resp)>
         passCompTableResponse2{0x00, 0x00, 0x00, 0x00, 0x02, 0x00};
     auto responseMsg2 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(passCompTableResponse2.data());
     rc = decode_pass_component_table_resp(
         responseMsg2, sizeof(pldm_pass_component_table_resp), &completionCode,
@@ -2523,6 +2584,7 @@
                          hdrSize + sizeof(pldm_pass_component_table_resp)>
         passCompTableResponse3{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c};
     auto responseMsg3 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(passCompTableResponse3.data());
     rc = decode_pass_component_table_resp(
         responseMsg3, sizeof(pldm_pass_component_table_resp), &completionCode,
@@ -2533,6 +2595,7 @@
                          hdrSize + sizeof(pldm_pass_component_table_resp)>
         passCompTableResponse4{0x00, 0x00, 0x00, 0x00, 0x00, 0xf0};
     auto responseMsg4 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(passCompTableResponse4.data());
     rc = decode_pass_component_table_resp(
         responseMsg4, sizeof(pldm_pass_component_table_resp), &completionCode,
@@ -2551,12 +2614,14 @@
     constexpr std::string_view compVerStr = "OpenBmcv2.2";
     constexpr uint8_t compVerStrLen = static_cast<uint8_t>(compVerStr.size());
     variable_field compVerStrInfo{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     compVerStrInfo.ptr = reinterpret_cast<const uint8_t*>(compVerStr.data());
     compVerStrInfo.length = compVerStrLen;
 
     std::array<uint8_t,
                hdrSize + sizeof(pldm_update_component_req) + compVerStrLen>
         request{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestMsg = reinterpret_cast<pldm_msg*>(request.data());
 
     auto rc = encode_update_component_req(
@@ -2586,12 +2651,14 @@
     constexpr std::string_view compVerStr = "OpenBmcv2.2";
     constexpr uint8_t compVerStrLen = static_cast<uint8_t>(compVerStr.size());
     variable_field compVerStrInfo{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     compVerStrInfo.ptr = reinterpret_cast<const uint8_t*>(compVerStr.data());
     compVerStrInfo.length = compVerStrLen;
 
     std::array<uint8_t,
                hdrSize + sizeof(pldm_update_component_req) + compVerStrLen>
         request{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestMsg = reinterpret_cast<pldm_msg*>(request.data());
 
     auto rc = encode_update_component_req(
@@ -2608,6 +2675,7 @@
         PLDM_STR_TYPE_ASCII, compVerStrLen, &compVerStrInfo, requestMsg,
         sizeof(pldm_update_component_req) + compVerStrLen);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_DATA);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     compVerStrInfo.ptr = reinterpret_cast<const uint8_t*>(compVerStr.data());
 
     rc = encode_update_component_req(
@@ -2661,6 +2729,7 @@
         updateComponentResponse1{0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                                  0x01, 0x00, 0x00, 0x00, 0x64, 0x00};
     auto responseMsg1 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(updateComponentResponse1.data());
 
     uint8_t completionCode = 0;
@@ -2687,6 +2756,7 @@
         updateComponentResponse2{0x00, 0x00, 0x00, 0x00, 0x01, 0x09,
                                  0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
     auto responseMsg2 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(updateComponentResponse2.data());
     rc = decode_update_component_resp(
         responseMsg2, sizeof(pldm_update_component_resp), &completionCode,
@@ -2703,6 +2773,7 @@
     constexpr std::array<uint8_t, hdrSize + sizeof(pldm_update_component_resp)>
         updateComponentResponse3{0x00, 0x00, 0x00, 0x80};
     auto responseMsg3 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(updateComponentResponse3.data());
 
     rc = decode_update_component_resp(
@@ -2721,6 +2792,7 @@
         updateComponentResponse1{0x00, 0x00, 0x00, 0x00, 0x01, 0x09,
                                  0x00, 0x00, 0x00, 0x00, 0x00};
     auto responseMsg1 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(updateComponentResponse1.data());
 
     uint8_t completionCode = 0;
@@ -2781,6 +2853,7 @@
         updateComponentResponse2{0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
                                  0x01, 0x00, 0x00, 0x00, 0x64, 0x00};
     auto responseMsg2 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(updateComponentResponse2.data());
     rc = decode_update_component_resp(
         responseMsg2, sizeof(pldm_update_component_resp), &completionCode,
@@ -2792,6 +2865,7 @@
         updateComponentResponse3{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,
                                  0x01, 0x00, 0x00, 0x00, 0x64, 0x00};
     auto responseMsg3 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(updateComponentResponse3.data());
     rc = decode_update_component_resp(
         responseMsg3, sizeof(pldm_update_component_resp), &completionCode,
@@ -2803,6 +2877,7 @@
         updateComponentResponse4{0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
                                  0x01, 0x00, 0x00, 0x00, 0x64, 0x00};
     auto responseMsg4 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(updateComponentResponse4.data());
     rc = decode_update_component_resp(
         responseMsg4, sizeof(pldm_update_component_resp), &completionCode,
@@ -2819,6 +2894,7 @@
                          hdrSize + sizeof(pldm_request_firmware_data_req)>
         reqFWDataReq{0x00, 0x00, 0x00, 0x2c, 0x01, 0x00,
                      0x00, 0xff, 0x00, 0x00, 0x00};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestMsg = reinterpret_cast<const pldm_msg*>(reqFWDataReq.data());
 
     uint32_t outOffset = 0;
@@ -2838,6 +2914,7 @@
                          hdrSize + sizeof(pldm_request_firmware_data_req)>
         reqFWDataReq{0x00, 0x00, 0x00, 0x2c, 0x01, 0x00,
                      0x00, 0x1f, 0x00, 0x00, 0x00};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestMsg = reinterpret_cast<const pldm_msg*>(reqFWDataReq.data());
 
     uint32_t outOffset = 0;
@@ -2886,6 +2963,7 @@
                            0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14,
                            0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c,
                            0x1d, 0x1e, 0x1f, 0x20};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responseMsg1 = reinterpret_cast<pldm_msg*>(reqFwDataResponse1.data());
     auto rc = encode_request_firmware_data_resp(
         instanceId, completionCode, responseMsg1,
@@ -2897,6 +2975,7 @@
         outReqFwDataResponse2{0x03, 0x05, 0x15, 0x82};
     std::array<uint8_t, hdrSize + sizeof(completionCode)> reqFwDataResponse2{
         0x00, 0x00, 0x00, 0x00};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responseMsg2 = reinterpret_cast<pldm_msg*>(reqFwDataResponse2.data());
     rc = encode_request_firmware_data_resp(
         instanceId, PLDM_FWUP_DATA_OUT_OF_RANGE, responseMsg2,
@@ -2908,6 +2987,7 @@
 TEST(RequestFirmwareData, errorPathEncodeResponse)
 {
     std::array<uint8_t, hdrSize> reqFwDataResponse{0x00, 0x00, 0x00};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responseMsg = reinterpret_cast<pldm_msg*>(reqFwDataResponse.data());
     auto rc = encode_request_firmware_data_resp(0, PLDM_SUCCESS, nullptr, 0);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_DATA);
@@ -2922,6 +3002,7 @@
     constexpr std::array<uint8_t, hdrSize + sizeof(transferResult)>
         transferCompleteReq1{0x00, 0x00, 0x00, 0x00};
     auto requestMsg1 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(transferCompleteReq1.data());
     uint8_t outTransferResult = 0;
 
@@ -2933,6 +3014,7 @@
     constexpr std::array<uint8_t, hdrSize + sizeof(transferResult)>
         transferCompleteReq2{0x00, 0x00, 0x00, 0x02};
     auto requestMsg2 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(transferCompleteReq2.data());
     rc = decode_transfer_complete_req(requestMsg2, sizeof(transferResult),
                                       &outTransferResult);
@@ -2945,6 +3027,7 @@
     constexpr std::array<uint8_t, hdrSize> transferCompleteReq{0x00, 0x00,
                                                                0x00};
     auto requestMsg =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(transferCompleteReq.data());
     uint8_t outTransferResult = 0;
 
@@ -2967,6 +3050,7 @@
     std::array<uint8_t, hdrSize + sizeof(completionCode)>
         transferCompleteResponse1{0x00, 0x00, 0x00, 0x00};
     auto responseMsg1 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<pldm_msg*>(transferCompleteResponse1.data());
     auto rc = encode_transfer_complete_resp(
         instanceId, completionCode, responseMsg1, sizeof(completionCode));
@@ -2978,6 +3062,7 @@
     std::array<uint8_t, hdrSize + sizeof(completionCode)>
         transferCompleteResponse2{0x00, 0x00, 0x00, 0x00};
     auto responseMsg2 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<pldm_msg*>(transferCompleteResponse2.data());
     rc = encode_transfer_complete_resp(instanceId,
                                        PLDM_FWUP_COMMAND_NOT_EXPECTED,
@@ -2990,6 +3075,7 @@
 {
     std::array<uint8_t, hdrSize> transferCompleteResponse{0x00, 0x00, 0x00};
     auto responseMsg =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<pldm_msg*>(transferCompleteResponse.data());
     auto rc = encode_transfer_complete_resp(0, PLDM_SUCCESS, nullptr, 0);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_DATA);
@@ -3004,6 +3090,7 @@
     constexpr std::array<uint8_t, hdrSize + sizeof(verifyResult)>
         verifyCompleteReq1{0x00, 0x00, 0x00, 0x00};
     auto requestMsg1 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(verifyCompleteReq1.data());
     uint8_t outVerifyResult = 0;
 
@@ -3015,6 +3102,7 @@
     constexpr std::array<uint8_t, hdrSize + sizeof(verifyResult)>
         verifyCompleteReq2{0x00, 0x00, 0x00, 0x03};
     auto requestMsg2 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(verifyCompleteReq2.data());
     rc = decode_verify_complete_req(requestMsg2, sizeof(verifyResult),
                                     &outVerifyResult);
@@ -3026,6 +3114,7 @@
 {
     constexpr std::array<uint8_t, hdrSize> verifyCompleteReq{0x00, 0x00, 0x00};
     auto requestMsg =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(verifyCompleteReq.data());
     uint8_t outVerifyResult = 0;
 
@@ -3048,6 +3137,7 @@
     std::array<uint8_t, hdrSize + sizeof(completionCode)>
         verifyCompleteResponse1{0x00, 0x00, 0x00, 0x00};
     auto responseMsg1 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<pldm_msg*>(verifyCompleteResponse1.data());
     auto rc = encode_verify_complete_resp(instanceId, completionCode,
                                           responseMsg1, sizeof(completionCode));
@@ -3059,6 +3149,7 @@
     std::array<uint8_t, hdrSize + sizeof(completionCode)>
         verifyCompleteResponse2{0x00, 0x00, 0x00, 0x00};
     auto responseMsg2 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<pldm_msg*>(verifyCompleteResponse2.data());
     rc = encode_verify_complete_resp(instanceId, PLDM_FWUP_COMMAND_NOT_EXPECTED,
                                      responseMsg2, sizeof(completionCode));
@@ -3070,6 +3161,7 @@
 {
     std::array<uint8_t, hdrSize> verifyCompleteResponse{0x00, 0x00, 0x00};
     auto responseMsg =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<pldm_msg*>(verifyCompleteResponse.data());
     auto rc = encode_verify_complete_resp(0, PLDM_SUCCESS, nullptr, 0);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_DATA);
@@ -3087,6 +3179,7 @@
     constexpr std::array<uint8_t, hdrSize + sizeof(pldm_apply_complete_req)>
         applyCompleteReq1{0x00, 0x00, 0x00, 0x01, 0x30, 0x00};
     auto requestMsg1 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(applyCompleteReq1.data());
     uint8_t outApplyResult = 0;
     bitfield16_t outCompActivationModification{};
@@ -3102,6 +3195,7 @@
     constexpr std::array<uint8_t, hdrSize + sizeof(pldm_apply_complete_req)>
         applyCompleteReq2{0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
     auto requestMsg2 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(applyCompleteReq2.data());
     rc = decode_apply_complete_req(requestMsg2, sizeof(pldm_apply_complete_req),
                                    &outApplyResult,
@@ -3115,6 +3209,7 @@
 {
     constexpr std::array<uint8_t, hdrSize> applyCompleteReq1{0x00, 0x00, 0x00};
     auto requestMsg1 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(applyCompleteReq1.data());
     uint8_t outApplyResult = 0;
     bitfield16_t outCompActivationModification{};
@@ -3139,6 +3234,7 @@
     constexpr std::array<uint8_t, hdrSize + sizeof(pldm_apply_complete_req)>
         applyCompleteReq2{0x00, 0x00, 0x00, 0x00, 0x01, 0x00};
     auto requestMsg2 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(applyCompleteReq2.data());
     rc = decode_apply_complete_req(requestMsg2, sizeof(pldm_apply_complete_req),
                                    &outApplyResult,
@@ -3155,6 +3251,7 @@
     std::array<uint8_t, hdrSize + sizeof(completionCode)>
         applyCompleteResponse1{0x00, 0x00, 0x00, 0x00};
     auto responseMsg1 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<pldm_msg*>(applyCompleteResponse1.data());
     auto rc = encode_apply_complete_resp(instanceId, completionCode,
                                          responseMsg1, sizeof(completionCode));
@@ -3166,6 +3263,7 @@
     std::array<uint8_t, hdrSize + sizeof(completionCode)>
         applyCompleteResponse2{0x00, 0x00, 0x00, 0x00};
     auto responseMsg2 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<pldm_msg*>(applyCompleteResponse2.data());
     rc = encode_apply_complete_resp(instanceId, PLDM_FWUP_COMMAND_NOT_EXPECTED,
                                     responseMsg2, sizeof(completionCode));
@@ -3177,6 +3275,7 @@
 {
     std::array<uint8_t, hdrSize> applyCompleteResponse{0x00, 0x00, 0x00};
     auto responseMsg =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<pldm_msg*>(applyCompleteResponse.data());
     auto rc = encode_apply_complete_resp(0, PLDM_SUCCESS, nullptr, 0);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_DATA);
@@ -3190,6 +3289,7 @@
     constexpr uint8_t instanceId = 7;
 
     std::array<uint8_t, hdrSize + sizeof(pldm_activate_firmware_req)> request{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestMsg = reinterpret_cast<pldm_msg*>(request.data());
 
     auto rc = encode_activate_firmware_req(
@@ -3205,6 +3305,7 @@
 TEST(ActivateFirmware, errorPathEncodeRequest)
 {
     std::array<uint8_t, hdrSize + sizeof(pldm_activate_firmware_req)> request{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestMsg = reinterpret_cast<pldm_msg*>(request.data());
 
     auto rc = encode_activate_firmware_req(
@@ -3227,6 +3328,7 @@
     constexpr std::array<uint8_t, hdrSize + sizeof(pldm_activate_firmware_resp)>
         activateFirmwareResponse1{0x00, 0x00, 0x00, 0x00, 0x64, 0x00};
     auto responseMsg1 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(activateFirmwareResponse1.data());
 
     uint8_t completionCode = 0;
@@ -3243,6 +3345,7 @@
     constexpr std::array<uint8_t, hdrSize + sizeof(completionCode)>
         activateFirmwareResponse2{0x00, 0x00, 0x00, 0x85};
     auto responseMsg2 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(activateFirmwareResponse2.data());
 
     rc = decode_activate_firmware_resp(responseMsg2, sizeof(completionCode),
@@ -3258,6 +3361,7 @@
     constexpr std::array<uint8_t, hdrSize + sizeof(pldm_activate_firmware_resp)>
         activateFirmwareResponse{0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
     auto responseMsg =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(activateFirmwareResponse.data());
 
     uint8_t completionCode = 0;
@@ -3292,6 +3396,7 @@
 {
     constexpr uint8_t instanceId = 8;
     std::array<uint8_t, hdrSize> request{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestMsg = reinterpret_cast<pldm_msg*>(request.data());
 
     auto rc = encode_get_status_req(instanceId, requestMsg,
@@ -3305,6 +3410,7 @@
 TEST(GetStatus, errorPathEncodeRequest)
 {
     std::array<uint8_t, hdrSize + sizeof(uint8_t)> request{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestMsg = reinterpret_cast<pldm_msg*>(request.data());
 
     auto rc = encode_get_status_req(0, nullptr, PLDM_GET_STATUS_REQ_BYTES);
@@ -3321,6 +3427,7 @@
         getStatusResponse1{0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03,
                            0x09, 0x65, 0x05, 0x00, 0x00, 0x00, 0x00};
     auto responseMsg1 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(getStatusResponse1.data());
 
     uint8_t completionCode = 0;
@@ -3355,6 +3462,7 @@
         getStatusResponse2{0x00, 0x00, 0x00, 0x00, 0x04, 0x03, 0x00,
                            0x70, 0x32, 0x05, 0x01, 0x00, 0x00, 0x00};
     auto responseMsg2 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(getStatusResponse2.data());
 
     rc = decode_get_status_resp(
@@ -3375,6 +3483,7 @@
     constexpr std::array<uint8_t, hdrSize + sizeof(completionCode)>
         getStatusResponse3{0x00, 0x00, 0x00, 0x04};
     auto responseMsg3 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(getStatusResponse3.data());
     rc = decode_get_status_resp(
         responseMsg3, getStatusResponse3.size() - hdrSize, &completionCode,
@@ -3397,6 +3506,7 @@
 
     constexpr std::array<uint8_t, hdrSize> getStatusResponse1{0x00, 0x00, 0x00};
     auto responseMsg1 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(getStatusResponse1.data());
 
     auto rc = decode_get_status_resp(
@@ -3463,6 +3573,7 @@
         getStatusResponse2{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                            0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
     auto responseMsg2 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(getStatusResponse2.data());
     rc = decode_get_status_resp(
         responseMsg2, getStatusResponse2.size() - hdrSize, &completionCode,
@@ -3474,6 +3585,7 @@
         getStatusResponse3{0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00,
                            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
     auto responseMsg3 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(getStatusResponse3.data());
     rc = decode_get_status_resp(
         responseMsg3, getStatusResponse3.size() - hdrSize, &completionCode,
@@ -3485,6 +3597,7 @@
         getStatusResponse4{0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00,
                            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
     auto responseMsg4 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(getStatusResponse4.data());
     rc = decode_get_status_resp(
         responseMsg4, getStatusResponse4.size() - hdrSize, &completionCode,
@@ -3496,6 +3609,7 @@
         getStatusResponse5{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
                            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
     auto responseMsg5 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(getStatusResponse5.data());
     rc = decode_get_status_resp(
         responseMsg5, getStatusResponse5.size() - hdrSize, &completionCode,
@@ -3507,6 +3621,7 @@
         getStatusResponse6{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                            0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
     auto responseMsg6 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(getStatusResponse6.data());
     rc = decode_get_status_resp(
         responseMsg6, getStatusResponse6.size() - hdrSize, &completionCode,
@@ -3518,6 +3633,7 @@
         getStatusResponse7{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                            0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00};
     auto responseMsg7 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(getStatusResponse7.data());
     rc = decode_get_status_resp(
         responseMsg7, getStatusResponse7.size() - hdrSize, &completionCode,
@@ -3529,6 +3645,7 @@
         getStatusResponse8{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                            0x00, 0x00, 0xc7, 0x00, 0x00, 0x00, 0x00};
     auto responseMsg8 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(getStatusResponse8.data());
     rc = decode_get_status_resp(
         responseMsg8, getStatusResponse8.size() - hdrSize, &completionCode,
@@ -3542,6 +3659,7 @@
         getStatusResponse9{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
                            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
     auto responseMsg9 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(getStatusResponse9.data());
     rc = decode_get_status_resp(
         responseMsg9, getStatusResponse9.size() - hdrSize, &completionCode,
@@ -3554,6 +3672,7 @@
 {
     constexpr uint8_t instanceId = 9;
     std::array<uint8_t, hdrSize> request{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestMsg = reinterpret_cast<pldm_msg*>(request.data());
 
     auto rc = encode_cancel_update_component_req(
@@ -3567,6 +3686,7 @@
 TEST(CancelUpdateComponent, errorPathEncodeRequest)
 {
     std::array<uint8_t, hdrSize + sizeof(uint8_t)> request{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestMsg = reinterpret_cast<pldm_msg*>(request.data());
 
     auto rc = encode_cancel_update_component_req(
@@ -3583,6 +3703,7 @@
     uint8_t completionCode = 0;
     constexpr std::array<uint8_t, hdrSize + sizeof(completionCode)>
         cancelUpdateComponentResponse1{0x00, 0x00, 0x00, 0x00};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responseMsg1 = reinterpret_cast<const pldm_msg*>(
         cancelUpdateComponentResponse1.data());
     auto rc = decode_cancel_update_component_resp(
@@ -3593,6 +3714,7 @@
 
     constexpr std::array<uint8_t, hdrSize + sizeof(completionCode)>
         cancelUpdateComponentResponse2{0x00, 0x00, 0x00, 0x86};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responseMsg2 = reinterpret_cast<const pldm_msg*>(
         cancelUpdateComponentResponse2.data());
     rc = decode_cancel_update_component_resp(
@@ -3608,6 +3730,7 @@
     constexpr std::array<uint8_t, hdrSize> cancelUpdateComponentResponse{
         0x00, 0x00, 0x00};
     auto responseMsg =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(cancelUpdateComponentResponse.data());
 
     auto rc = decode_cancel_update_component_resp(
@@ -3629,6 +3752,7 @@
 {
     constexpr uint8_t instanceId = 10;
     std::array<uint8_t, hdrSize> request{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestMsg = reinterpret_cast<pldm_msg*>(request.data());
 
     auto rc = encode_cancel_update_req(instanceId, requestMsg,
@@ -3642,6 +3766,7 @@
 TEST(CancelUpdate, errorPathEncodeRequest)
 {
     std::array<uint8_t, hdrSize + sizeof(uint8_t)> request{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestMsg = reinterpret_cast<pldm_msg*>(request.data());
 
     auto rc =
@@ -3660,6 +3785,7 @@
         cancelUpdateResponse1{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                               0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
     auto responseMsg1 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(cancelUpdateResponse1.data());
     uint8_t completionCode = 0;
     bool8_t nonFunctioningComponentIndication = 0;
@@ -3679,6 +3805,7 @@
         cancelUpdateResponse2{0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
                               0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
     auto responseMsg2 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(cancelUpdateResponse2.data());
     rc = decode_cancel_update_resp(
         responseMsg2, cancelUpdateResponse2.size() - hdrSize, &completionCode,
@@ -3693,6 +3820,7 @@
     constexpr std::array<uint8_t, hdrSize + sizeof(completionCode)>
         cancelUpdateResponse3{0x00, 0x00, 0x00, 0x86};
     auto responseMsg3 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(cancelUpdateResponse3.data());
     rc = decode_cancel_update_resp(
         responseMsg3, cancelUpdateResponse3.size() - hdrSize, &completionCode,
@@ -3706,6 +3834,7 @@
     constexpr std::array<uint8_t, hdrSize> cancelUpdateResponse1{0x00, 0x00,
                                                                  0x00};
     auto responseMsg1 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(cancelUpdateResponse1.data());
     uint8_t completionCode = 0;
     bool8_t nonFunctioningComponentIndication = 0;
@@ -3739,6 +3868,7 @@
     constexpr std::array<uint8_t, hdrSize + sizeof(completionCode)>
         cancelUpdateResponse2{0x00, 0x00, 0x00, 0x00};
     auto responseMsg2 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(cancelUpdateResponse2.data());
     rc = decode_cancel_update_resp(
         responseMsg2, cancelUpdateResponse2.size() - hdrSize, &completionCode,
@@ -3749,6 +3879,7 @@
         cancelUpdateResponse3{0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
                               0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
     auto responseMsg3 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const pldm_msg*>(cancelUpdateResponse3.data());
     rc = decode_cancel_update_resp(
         responseMsg3, cancelUpdateResponse3.size() - hdrSize, &completionCode,
diff --git a/tests/dsp/fru.cpp b/tests/dsp/fru.cpp
index 11cbc5d..1f32852 100644
--- a/tests/dsp/fru.cpp
+++ b/tests/dsp/fru.cpp
@@ -13,6 +13,7 @@
 TEST(GetFruRecordTableMetadata, testGoodEncodeRequest)
 {
     std::array<uint8_t, sizeof(pldm_msg_hdr)> requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
     auto rc = encode_get_fru_record_table_metadata_req(
         0, requestPtr, PLDM_GET_FRU_RECORD_TABLE_METADATA_REQ_BYTES);
@@ -28,6 +29,7 @@
     auto rc = encode_get_fru_record_table_metadata_req(0, NULL, 0);
     ASSERT_EQ(rc, PLDM_ERROR_INVALID_DATA);
     std::array<uint8_t, sizeof(pldm_msg_hdr)> requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
     rc = encode_get_fru_record_table_metadata_req(0, requestPtr, 1);
     ASSERT_EQ(rc, PLDM_ERROR_INVALID_LENGTH);
@@ -38,8 +40,10 @@
 
     std::vector<uint8_t> responseMsg(
         sizeof(pldm_msg_hdr) + PLDM_GET_FRU_RECORD_TABLE_METADATA_RESP_BYTES);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
     size_t payload_length = responseMsg.size() - sizeof(pldm_msg_hdr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_get_fru_record_table_metadata_resp*>(
         responsePtr->payload);
 
@@ -117,8 +121,10 @@
 {
     std::vector<uint8_t> responseMsg(
         sizeof(pldm_msg_hdr) + PLDM_GET_FRU_RECORD_TABLE_METADATA_RESP_BYTES);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
     size_t payload_length = responseMsg.size() - sizeof(pldm_msg_hdr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_get_fru_record_table_metadata_resp*>(
         responsePtr->payload);
 
@@ -196,6 +202,7 @@
     std::array<uint8_t, sizeof(pldm_msg_hdr) +
                             PLDM_GET_FRU_RECORD_TABLE_METADATA_RESP_BYTES>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     responsePtr->hdr.request = PLDM_RESPONSE;
@@ -217,6 +224,7 @@
         fru_table_maximum_size, fru_table_length, total_record_set_identifiers,
         total_table_records, checksum, responsePtr);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_get_fru_record_table_metadata_resp*>(
         responsePtr->payload);
 
@@ -268,6 +276,7 @@
     std::array<uint8_t, sizeof(pldm_msg_hdr) +
                             PLDM_GET_FRU_RECORD_TABLE_METADATA_RESP_BYTES>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     uint8_t completion_code = PLDM_SUCCESS;
@@ -284,6 +293,7 @@
         fru_table_maximum_size, fru_table_length, total_record_set_identifiers,
         total_table_records, checksum, NULL);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_get_fru_record_table_metadata_resp*>(
         responsePtr->payload);
 
@@ -305,9 +315,11 @@
     std::array<uint8_t,
                PLDM_GET_FRU_RECORD_TABLE_REQ_BYTES + sizeof(pldm_msg_hdr)>
         requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
     size_t payload_length = requestMsg.size() - sizeof(pldm_msg_hdr);
     auto request =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<pldm_get_fru_record_table_req*>(requestPtr->payload);
 
     request->data_transfer_handle = htole32(data_transfer_handle);
@@ -334,6 +346,7 @@
     std::array<uint8_t,
                sizeof(pldm_msg_hdr) + PLDM_GET_FRU_RECORD_TABLE_REQ_BYTES>
         requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     // Payload message is missing
@@ -356,8 +369,10 @@
     std::vector<uint8_t> responseMsg(sizeof(pldm_msg_hdr) +
                                      PLDM_GET_FRU_RECORD_TABLE_MIN_RESP_BYTES);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
     auto response =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<pldm_get_fru_record_table_resp*>(responsePtr->payload);
 
     // Invoke encode get FRU record table response api
@@ -384,6 +399,7 @@
     std::vector<uint8_t> responseMsg(sizeof(pldm_msg_hdr) +
                                      PLDM_GET_FRU_RECORD_TABLE_MIN_RESP_BYTES);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
     auto rc = encode_get_fru_record_table_resp(
         0, PLDM_ERROR, next_data_transfer_handle, transfer_flag, responsePtr);
@@ -408,8 +424,10 @@
                sizeof(pldm_msg_hdr) + PLDM_GET_FRU_RECORD_TABLE_REQ_BYTES>
         requestMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
     auto request =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<pldm_get_fru_record_table_req*>(requestPtr->payload);
 
     // Random value for data transfer handle and transfer operation flag
@@ -457,9 +475,11 @@
                                      PLDM_GET_FRU_RECORD_TABLE_MIN_RESP_BYTES +
                                      fru_record_table_data.size());
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
     size_t payload_length = responseMsg.size() - sizeof(pldm_msg_hdr);
     auto response =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<pldm_get_fru_record_table_resp*>(responsePtr->payload);
 
     response->completion_code = completion_code;
@@ -501,6 +521,7 @@
                                      PLDM_GET_FRU_RECORD_TABLE_MIN_RESP_BYTES +
                                      fru_record_table_data.size());
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     // Payload message is missing
@@ -531,6 +552,7 @@
     constexpr auto payLoadLength = sizeof(pldm_get_fru_record_by_option_req);
 
     std::array<uint8_t, sizeof(pldm_msg_hdr) + payLoadLength> request;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto reqMsg = reinterpret_cast<pldm_msg*>(request.data());
 
     auto rc = encode_get_fru_record_by_option_req(
@@ -541,6 +563,7 @@
     EXPECT_EQ(instanceId, reqMsg->hdr.instance_id);
 
     auto payLoadMsg =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<pldm_get_fru_record_by_option_req*>(reqMsg->payload);
 
     EXPECT_EQ(le32toh(payLoadMsg->data_transfer_handle), dataTransferHandle);
@@ -561,6 +584,7 @@
 
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_DATA);
     std::array<uint8_t, sizeof(pldm_msg_hdr) + payLoadLength> request;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto reqMsg = reinterpret_cast<pldm_msg*>(request.data());
 
     rc = encode_get_fru_record_by_option_req(1, 2, 3, 4, 5, 6, 0, reqMsg,
@@ -582,6 +606,7 @@
     constexpr auto payLoadLength = sizeof(pldm_get_fru_record_by_option_req);
 
     std::array<uint8_t, sizeof(pldm_msg_hdr) + payLoadLength> request;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto reqMsg = reinterpret_cast<pldm_msg*>(request.data());
 
     auto rc = encode_get_fru_record_by_option_req(
@@ -615,6 +640,7 @@
 {
     constexpr auto payLoadLength = sizeof(pldm_get_fru_record_by_option_req);
     std::array<uint8_t, sizeof(pldm_msg_hdr) + payLoadLength> request{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto reqMsg = reinterpret_cast<pldm_msg*>(request.data());
 
     uint32_t retDataTransferHandle{};
@@ -651,6 +677,7 @@
         sizeof(pldm_get_fru_record_by_option_resp) - 1 + fruData.size();
 
     std::array<uint8_t, sizeof(pldm_msg_hdr) + payLoadLength> response;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto respMsg = reinterpret_cast<pldm_msg*>(response.data());
 
     auto rc = encode_get_fru_record_by_option_resp(
@@ -658,6 +685,7 @@
         fruData.data(), fruData.size(), respMsg, payLoadLength);
 
     auto payLoadMsg =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<pldm_get_fru_record_by_option_resp*>(respMsg->payload);
 
     EXPECT_EQ(rc, PLDM_SUCCESS);
@@ -683,6 +711,7 @@
         sizeof(pldm_get_fru_record_by_option_resp) - 1 + fruData.size();
 
     std::array<uint8_t, sizeof(pldm_msg_hdr) + payLoadLength> response;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto respMsg = reinterpret_cast<pldm_msg*>(response.data());
 
     auto rc = encode_get_fru_record_by_option_resp(
@@ -710,6 +739,7 @@
         sizeof(pldm_get_fru_record_by_option_resp) - 1 + fruData.size();
 
     std::array<uint8_t, sizeof(pldm_msg_hdr) + payLoadLength> response;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto respMsg = reinterpret_cast<pldm_msg*>(response.data());
 
     auto rc = encode_get_fru_record_by_option_resp(
@@ -748,6 +778,7 @@
         sizeof(pldm_get_fru_record_by_option_resp) - 1 + fruData.size();
 
     std::array<uint8_t, sizeof(pldm_msg_hdr) + payLoadLength> response;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto respMsg = reinterpret_cast<pldm_msg*>(response.data());
 
     auto rc = encode_get_fru_record_by_option_resp(
@@ -785,6 +816,7 @@
                sizeof(pldm_msg_hdr) + PLDM_SET_FRU_RECORD_TABLE_RESP_BYTES>
         responseMsg{};
     struct pldm_msg* response =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_msg*>(responseMsg.data());
     auto rc = encode_set_fru_record_table_resp(
         instanceId, completionCode, nextDataTransferHandle,
@@ -792,6 +824,7 @@
     EXPECT_EQ(rc, PLDM_SUCCESS);
 
     struct pldm_set_fru_record_table_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_set_fru_record_table_resp*>(
             response->payload);
     EXPECT_EQ(completionCode, resp->completion_code);
@@ -808,6 +841,7 @@
                sizeof(pldm_msg_hdr) + PLDM_SET_FRU_RECORD_TABLE_RESP_BYTES>
         responseMsg{};
     struct pldm_msg* response =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_msg*>(responseMsg.data());
 
     auto rc = encode_set_fru_record_table_resp(
@@ -831,8 +865,10 @@
                             PLDM_SET_FRU_RECORD_TABLE_MIN_REQ_BYTES +
                             sizeof(tableData)>
         requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<struct pldm_msg*>(requestMsg.data());
     struct pldm_set_fru_record_table_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_set_fru_record_table_req*>(
             request->payload);
     req->data_transfer_handle = htole32(transferHandle);
@@ -864,8 +900,10 @@
                             PLDM_SET_FRU_RECORD_TABLE_MIN_REQ_BYTES +
                             sizeof(tableData)>
         requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<struct pldm_msg*>(requestMsg.data());
     struct pldm_set_fru_record_table_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_set_fru_record_table_req*>(
             request->payload);
     req->data_transfer_handle = htole32(transferHandle);
diff --git a/tests/dsp/pdr.cpp b/tests/dsp/pdr.cpp
index b8e224e..ef6e4e8 100644
--- a/tests/dsp/pdr.cpp
+++ b/tests/dsp/pdr.cpp
@@ -272,6 +272,7 @@
 
     std::array<uint32_t, 10> in{100, 345, 3, 6, 89, 0, 11, 45, 23434, 123123};
     uint32_t handle = 1;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     EXPECT_EQ(pldm_pdr_add(repo, reinterpret_cast<uint8_t*>(in.data()),
                            sizeof(in), false, 1, &handle),
               0);
@@ -306,14 +307,17 @@
     std::array<uint32_t, 10> in2{1000, 3450, 30,  60,     890,
                                  0,    110,  450, 234034, 123123};
     handle = 2;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     EXPECT_EQ(pldm_pdr_add(repo, reinterpret_cast<uint8_t*>(in2.data()),
                            sizeof(in2), false, 1, &handle),
               0);
     handle = 3;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     EXPECT_EQ(pldm_pdr_add(repo, reinterpret_cast<uint8_t*>(in2.data()),
                            sizeof(in2), false, 1, &handle),
               0);
     handle = 4;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     EXPECT_EQ(pldm_pdr_add(repo, reinterpret_cast<uint8_t*>(in2.data()),
                            sizeof(in2), true, 1, &handle),
               0);
@@ -362,6 +366,7 @@
 
     std::array<uint32_t, 10> in{100, 345, 3, 6, 89, 0, 11, 45, 23434, 123123};
     uint32_t handle = 1;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     EXPECT_EQ(pldm_pdr_add(repo, reinterpret_cast<uint8_t*>(in.data()),
                            sizeof(in), false, 1, &handle),
               0);
@@ -380,14 +385,17 @@
     std::array<uint32_t, 10> in2{1000, 3450, 30,  60,     890,
                                  0,    110,  450, 234034, 123123};
     handle = 2;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     EXPECT_EQ(pldm_pdr_add(repo, reinterpret_cast<uint8_t*>(in2.data()),
                            sizeof(in2), false, 1, &handle),
               0);
     handle = 3;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     EXPECT_EQ(pldm_pdr_add(repo, reinterpret_cast<uint8_t*>(in2.data()),
                            sizeof(in2), false, 1, &handle),
               0);
     handle = 4;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     EXPECT_EQ(pldm_pdr_add(repo, reinterpret_cast<uint8_t*>(in2.data()),
                            sizeof(in2), false, 1, &handle),
               0);
@@ -420,6 +428,7 @@
     auto repo = pldm_pdr_init();
 
     std::array<uint8_t, sizeof(pldm_pdr_hdr)> data{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_pdr_hdr* hdr = reinterpret_cast<pldm_pdr_hdr*>(data.data());
     hdr->type = 1;
     uint32_t first = 0;
@@ -493,11 +502,13 @@
     EXPECT_NE(hdl, nullptr);
     EXPECT_EQ(size, sizeof(pldm_pdr_hdr) + sizeof(pldm_pdr_fru_record_set));
     EXPECT_EQ(nextRecHdl, 0u);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_pdr_hdr* hdr = reinterpret_cast<pldm_pdr_hdr*>(outData);
     EXPECT_EQ(hdr->version, 1u);
     EXPECT_EQ(hdr->type, PLDM_PDR_FRU_RECORD_SET);
     EXPECT_EQ(hdr->length, htole16(sizeof(pldm_pdr_fru_record_set)));
     EXPECT_EQ(hdr->record_handle, htole32(1));
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_pdr_fru_record_set* fru = reinterpret_cast<pldm_pdr_fru_record_set*>(
         outData + sizeof(pldm_pdr_hdr));
     EXPECT_EQ(fru->terminus_handle, htole16(1));
@@ -517,11 +528,13 @@
     EXPECT_NE(hdl, nullptr);
     EXPECT_EQ(size, sizeof(pldm_pdr_hdr) + sizeof(pldm_pdr_fru_record_set));
     EXPECT_EQ(nextRecHdl, 0u);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     hdr = reinterpret_cast<pldm_pdr_hdr*>(outData);
     EXPECT_EQ(hdr->version, 1u);
     EXPECT_EQ(hdr->type, PLDM_PDR_FRU_RECORD_SET);
     EXPECT_EQ(hdr->length, htole16(sizeof(pldm_pdr_fru_record_set)));
     EXPECT_EQ(hdr->record_handle, htole32(2));
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     fru = reinterpret_cast<pldm_pdr_fru_record_set*>(outData +
                                                      sizeof(pldm_pdr_hdr));
     EXPECT_EQ(fru->terminus_handle, htole16(2));
@@ -535,11 +548,13 @@
     EXPECT_NE(hdl, nullptr);
     EXPECT_EQ(size, sizeof(pldm_pdr_hdr) + sizeof(pldm_pdr_fru_record_set));
     EXPECT_EQ(nextRecHdl, 2u);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     hdr = reinterpret_cast<pldm_pdr_hdr*>(outData);
     EXPECT_EQ(hdr->version, 1u);
     EXPECT_EQ(hdr->type, PLDM_PDR_FRU_RECORD_SET);
     EXPECT_EQ(hdr->length, htole16(sizeof(pldm_pdr_fru_record_set)));
     EXPECT_EQ(hdr->record_handle, htole32(1));
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     fru = reinterpret_cast<pldm_pdr_fru_record_set*>(outData +
                                                      sizeof(pldm_pdr_hdr));
     EXPECT_EQ(fru->terminus_handle, htole16(1));
@@ -635,18 +650,21 @@
 
     hdr.type = 1;
     uint16_t firstTerminusHandle = 1;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     EXPECT_EQ(pldm_pdr_add(repo, reinterpret_cast<const uint8_t*>(&hdr),
                            sizeof(hdr), false, firstTerminusHandle, NULL),
               0);
 
     hdr.type = 2;
     uint16_t secondTerminusHandle = 2;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     EXPECT_EQ(pldm_pdr_add(repo, reinterpret_cast<const uint8_t*>(&hdr),
                            sizeof(hdr), true, secondTerminusHandle, NULL),
               0);
 
     hdr.type = 3;
     uint16_t thirdTerminusHandle = 3;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     EXPECT_EQ(pldm_pdr_add(repo, reinterpret_cast<const uint8_t*>(&hdr),
                            sizeof(hdr), true, thirdTerminusHandle, NULL),
               0);
@@ -1180,16 +1198,19 @@
                                       l1, PLDM_ENTITY_ASSOCIAION_LOGICAL) *
                                   sizeof(pldm_entity)));
     uint8_t* start = data;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_pdr_hdr* hdr = reinterpret_cast<pldm_pdr_hdr*>(start);
     EXPECT_EQ(le32toh(hdr->record_handle), 1u);
     EXPECT_EQ(hdr->type, PLDM_PDR_ENTITY_ASSOCIATION);
     EXPECT_EQ(le16toh(hdr->length), size - sizeof(struct pldm_pdr_hdr));
     start += sizeof(pldm_pdr_hdr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     uint16_t* containerId = reinterpret_cast<uint16_t*>(start);
     EXPECT_EQ(le16toh(*containerId), 1u);
     start += sizeof(uint16_t);
     EXPECT_EQ(*start, PLDM_ENTITY_ASSOCIAION_LOGICAL);
     start += sizeof(uint8_t);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_entity* entity = reinterpret_cast<pldm_entity*>(start);
     EXPECT_EQ(le16toh(entity->entity_type), 1u);
     EXPECT_EQ(le16toh(entity->entity_instance_num), 1u);
@@ -1198,11 +1219,13 @@
     EXPECT_EQ(*start,
               pldm_entity_get_num_children(l1, PLDM_ENTITY_ASSOCIAION_LOGICAL));
     start += sizeof(uint8_t);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     entity = reinterpret_cast<pldm_entity*>(start);
     EXPECT_EQ(le16toh(entity->entity_type), 3u);
     EXPECT_EQ(le16toh(entity->entity_instance_num), 1u);
     EXPECT_EQ(le16toh(entity->entity_container_id), 1u);
     start += sizeof(pldm_entity);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     entity = reinterpret_cast<pldm_entity*>(start);
     EXPECT_EQ(le16toh(entity->entity_type), 3u);
     EXPECT_EQ(le16toh(entity->entity_instance_num), 2u);
@@ -1215,16 +1238,19 @@
                                       l1, PLDM_ENTITY_ASSOCIAION_PHYSICAL) *
                                   sizeof(pldm_entity)));
     start = data;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     hdr = reinterpret_cast<pldm_pdr_hdr*>(start);
     EXPECT_EQ(le32toh(hdr->record_handle), 2u);
     EXPECT_EQ(hdr->type, PLDM_PDR_ENTITY_ASSOCIATION);
     EXPECT_EQ(le16toh(hdr->length), size - sizeof(struct pldm_pdr_hdr));
     start += sizeof(pldm_pdr_hdr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     containerId = reinterpret_cast<uint16_t*>(start);
     EXPECT_EQ(le16toh(*containerId), 1u);
     start += sizeof(uint16_t);
     EXPECT_EQ(*start, PLDM_ENTITY_ASSOCIAION_PHYSICAL);
     start += sizeof(uint8_t);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     entity = reinterpret_cast<pldm_entity*>(start);
     EXPECT_EQ(le16toh(entity->entity_type), 1u);
     EXPECT_EQ(le16toh(entity->entity_instance_num), 1u);
@@ -1233,11 +1259,13 @@
     EXPECT_EQ(*start, pldm_entity_get_num_children(
                           l1, PLDM_ENTITY_ASSOCIAION_PHYSICAL));
     start += sizeof(uint8_t);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     entity = reinterpret_cast<pldm_entity*>(start);
     EXPECT_EQ(le16toh(entity->entity_type), 2u);
     EXPECT_EQ(le16toh(entity->entity_instance_num), 1u);
     EXPECT_EQ(le16toh(entity->entity_container_id), 1u);
     start += sizeof(pldm_entity);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     entity = reinterpret_cast<pldm_entity*>(start);
     EXPECT_EQ(le16toh(entity->entity_type), 2u);
     EXPECT_EQ(le16toh(entity->entity_instance_num), 2u);
@@ -1250,16 +1278,19 @@
                                       l2a, PLDM_ENTITY_ASSOCIAION_LOGICAL) *
                                   sizeof(pldm_entity)));
     start = data;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     hdr = reinterpret_cast<pldm_pdr_hdr*>(start);
     EXPECT_EQ(le32toh(hdr->record_handle), 3u);
     EXPECT_EQ(hdr->type, PLDM_PDR_ENTITY_ASSOCIATION);
     EXPECT_EQ(le16toh(hdr->length), size - sizeof(struct pldm_pdr_hdr));
     start += sizeof(pldm_pdr_hdr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     containerId = reinterpret_cast<uint16_t*>(start);
     EXPECT_EQ(le16toh(*containerId), 2u);
     start += sizeof(uint16_t);
     EXPECT_EQ(*start, PLDM_ENTITY_ASSOCIAION_LOGICAL);
     start += sizeof(uint8_t);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     entity = reinterpret_cast<pldm_entity*>(start);
     EXPECT_EQ(le16toh(entity->entity_type), 2u);
     EXPECT_EQ(le16toh(entity->entity_instance_num), 1u);
@@ -1268,11 +1299,13 @@
     EXPECT_EQ(*start, pldm_entity_get_num_children(
                           l2a, PLDM_ENTITY_ASSOCIAION_LOGICAL));
     start += sizeof(uint8_t);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     entity = reinterpret_cast<pldm_entity*>(start);
     EXPECT_EQ(le16toh(entity->entity_type), 5);
     EXPECT_EQ(le16toh(entity->entity_instance_num), 2u);
     EXPECT_EQ(le16toh(entity->entity_container_id), 2u);
     start += sizeof(pldm_entity);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     entity = reinterpret_cast<pldm_entity*>(start);
     EXPECT_EQ(le16toh(entity->entity_type), 5u);
     EXPECT_EQ(le16toh(entity->entity_instance_num), 3u);
@@ -1285,16 +1318,19 @@
                                       l2a, PLDM_ENTITY_ASSOCIAION_PHYSICAL) *
                                   sizeof(pldm_entity)));
     start = data;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     hdr = reinterpret_cast<pldm_pdr_hdr*>(start);
     EXPECT_EQ(le32toh(hdr->record_handle), 4u);
     EXPECT_EQ(hdr->type, PLDM_PDR_ENTITY_ASSOCIATION);
     EXPECT_EQ(le16toh(hdr->length), size - sizeof(struct pldm_pdr_hdr));
     start += sizeof(pldm_pdr_hdr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     containerId = reinterpret_cast<uint16_t*>(start);
     EXPECT_EQ(le16toh(*containerId), 2u);
     start += sizeof(uint16_t);
     EXPECT_EQ(*start, PLDM_ENTITY_ASSOCIAION_PHYSICAL);
     start += sizeof(uint8_t);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     entity = reinterpret_cast<pldm_entity*>(start);
     EXPECT_EQ(le16toh(entity->entity_type), 2u);
     EXPECT_EQ(le16toh(entity->entity_instance_num), 1u);
@@ -1303,11 +1339,13 @@
     EXPECT_EQ(*start, pldm_entity_get_num_children(
                           l2a, PLDM_ENTITY_ASSOCIAION_PHYSICAL));
     start += sizeof(uint8_t);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     entity = reinterpret_cast<pldm_entity*>(start);
     EXPECT_EQ(le16toh(entity->entity_type), 4u);
     EXPECT_EQ(le16toh(entity->entity_instance_num), 1u);
     EXPECT_EQ(le16toh(entity->entity_container_id), 2u);
     start += sizeof(pldm_entity);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     entity = reinterpret_cast<pldm_entity*>(start);
     EXPECT_EQ(le16toh(entity->entity_type), 5u);
     EXPECT_EQ(le16toh(entity->entity_instance_num), 1u);
@@ -1320,16 +1358,19 @@
                                       l3a, PLDM_ENTITY_ASSOCIAION_PHYSICAL) *
                                   sizeof(pldm_entity)));
     start = data;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     hdr = reinterpret_cast<pldm_pdr_hdr*>(start);
     EXPECT_EQ(le32toh(hdr->record_handle), 5u);
     EXPECT_EQ(hdr->type, PLDM_PDR_ENTITY_ASSOCIATION);
     EXPECT_EQ(le16toh(hdr->length), size - sizeof(struct pldm_pdr_hdr));
     start += sizeof(pldm_pdr_hdr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     containerId = reinterpret_cast<uint16_t*>(start);
     EXPECT_EQ(le16toh(*containerId), 3u);
     start += sizeof(uint16_t);
     EXPECT_EQ(*start, PLDM_ENTITY_ASSOCIAION_PHYSICAL);
     start += sizeof(uint8_t);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     entity = reinterpret_cast<pldm_entity*>(start);
     EXPECT_EQ(le16toh(entity->entity_type), 4u);
     EXPECT_EQ(le16toh(entity->entity_instance_num), 1u);
@@ -1338,6 +1379,7 @@
     EXPECT_EQ(*start, pldm_entity_get_num_children(
                           l3a, PLDM_ENTITY_ASSOCIAION_PHYSICAL));
     start += sizeof(uint8_t);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     entity = reinterpret_cast<pldm_entity*>(start);
     EXPECT_EQ(le16toh(entity->entity_type), 6u);
     EXPECT_EQ(le16toh(entity->entity_instance_num), 1u);
@@ -1350,16 +1392,19 @@
                                       l3b, PLDM_ENTITY_ASSOCIAION_LOGICAL) *
                                   sizeof(pldm_entity)));
     start = data;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     hdr = reinterpret_cast<pldm_pdr_hdr*>(start);
     EXPECT_EQ(le32toh(hdr->record_handle), 6u);
     EXPECT_EQ(hdr->type, PLDM_PDR_ENTITY_ASSOCIATION);
     EXPECT_EQ(le16toh(hdr->length), size - sizeof(struct pldm_pdr_hdr));
     start += sizeof(pldm_pdr_hdr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     containerId = reinterpret_cast<uint16_t*>(start);
     EXPECT_EQ(le16toh(*containerId), 4u);
     start += sizeof(uint16_t);
     EXPECT_EQ(*start, PLDM_ENTITY_ASSOCIAION_LOGICAL);
     start += sizeof(uint8_t);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     entity = reinterpret_cast<pldm_entity*>(start);
     EXPECT_EQ(le16toh(entity->entity_type), 5u);
     EXPECT_EQ(le16toh(entity->entity_instance_num), 1u);
@@ -1368,6 +1413,7 @@
     EXPECT_EQ(*start, pldm_entity_get_num_children(
                           l3b, PLDM_ENTITY_ASSOCIAION_LOGICAL));
     start += sizeof(uint8_t);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     entity = reinterpret_cast<pldm_entity*>(start);
     EXPECT_EQ(le16toh(entity->entity_type), 7u);
     EXPECT_EQ(le16toh(entity->entity_instance_num), 1u);
@@ -1516,12 +1562,14 @@
     std::vector<uint8_t> pdr{};
     pdr.resize(sizeof(pldm_pdr_hdr) + sizeof(pldm_pdr_entity_association) +
                sizeof(pldm_entity) * 4);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_pdr_hdr* hdr = reinterpret_cast<pldm_pdr_hdr*>(pdr.data());
     hdr->type = PLDM_PDR_ENTITY_ASSOCIATION;
     hdr->length =
         htole16(sizeof(pldm_pdr_entity_association) + sizeof(pldm_entity) * 4);
 
     pldm_pdr_entity_association* e =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<pldm_pdr_entity_association*>(pdr.data() +
                                                        sizeof(pldm_pdr_hdr));
     e->container_id = htole16(1);
@@ -1869,12 +1917,14 @@
     outData = nullptr;
     auto hdl1 = pldm_pdr_find_record(repo, 2, &outData, &size, &nextRecHdl);
     EXPECT_NE(hdl1, nullptr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_pdr_hdr* hdr = reinterpret_cast<pldm_pdr_hdr*>(outData);
     EXPECT_EQ(hdr->record_handle, 2);
 
     outData = nullptr;
     auto hdl2 = pldm_pdr_find_record(repo, 23, &outData, &size, &nextRecHdl);
     EXPECT_NE(hdl2, nullptr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_pdr_hdr* hdr1 = reinterpret_cast<pldm_pdr_hdr*>(outData);
     EXPECT_EQ(hdr1->record_handle, 23);
 
diff --git a/tests/dsp/platform.cpp b/tests/dsp/platform.cpp
index 1c89cba..a8a530c 100644
--- a/tests/dsp/platform.cpp
+++ b/tests/dsp/platform.cpp
@@ -21,6 +21,7 @@
     std::array<uint8_t,
                sizeof(pldm_msg_hdr) + PLDM_SET_STATE_EFFECTER_STATES_RESP_BYTES>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     uint8_t completionCode = 0;
 
@@ -35,6 +36,7 @@
     std::array<uint8_t,
                sizeof(pldm_msg_hdr) + PLDM_SET_STATE_EFFECTER_STATES_REQ_BYTES>
         requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     uint16_t effecterId = 0x0a;
@@ -72,6 +74,7 @@
 
     responseMsg[hdrSize] = PLDM_SUCCESS;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = decode_set_state_effecter_states_resp(
@@ -106,6 +109,7 @@
                hdrSize,
            &stateField, sizeof(stateField));
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = decode_set_state_effecter_states_req(
@@ -136,6 +140,7 @@
     std::array<uint8_t, PLDM_SET_STATE_EFFECTER_STATES_RESP_BYTES>
         responseMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = decode_set_state_effecter_states_resp(response,
@@ -157,6 +162,7 @@
     // + size of record data and transfer CRC
     std::vector<uint8_t> responseMsg(hdrSize + PLDM_GET_PDR_MIN_RESP_BYTES +
                                      recordData.size() + 1);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = encode_get_pdr_resp(0, PLDM_SUCCESS, nextRecordHndl,
@@ -165,6 +171,7 @@
 
     EXPECT_EQ(rc, PLDM_SUCCESS);
     struct pldm_get_pdr_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_pdr_resp*>(response->payload);
 
     EXPECT_EQ(completionCode, resp->completion_code);
@@ -218,8 +225,10 @@
     uint16_t retRequestCnt = 0;
     uint16_t retRecordChangeNum = 0;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto req = reinterpret_cast<pldm_msg*>(requestMsg.data());
     struct pldm_get_pdr_req* request =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_pdr_req*>(req->payload);
 
     request->record_handle = htole32(recordHndl);
@@ -243,6 +252,7 @@
 TEST(GetPDR, testBadDecodeRequest)
 {
     std::array<uint8_t, PLDM_GET_PDR_REQ_BYTES> requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto req = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = decode_get_pdr_req(req, requestMsg.size(), NULL, NULL, NULL, NULL,
@@ -260,6 +270,7 @@
     uint16_t record_chg_num = 0;
 
     std::vector<uint8_t> requestMsg(hdrSize + PLDM_GET_PDR_REQ_BYTES);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_get_pdr_req(0, record_hndl, data_transfer_hndl,
@@ -267,6 +278,7 @@
                                  request, PLDM_GET_PDR_REQ_BYTES);
     EXPECT_EQ(rc, PLDM_SUCCESS);
     struct pldm_get_pdr_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_pdr_req*>(request->payload);
     EXPECT_EQ(record_hndl, le32toh(req->record_handle));
     EXPECT_EQ(data_transfer_hndl, le32toh(req->data_transfer_handle));
@@ -284,6 +296,7 @@
     uint16_t record_chg_num = 0;
 
     std::vector<uint8_t> requestMsg(hdrSize + PLDM_GET_PDR_REQ_BYTES);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_get_pdr_req(0, record_hndl, data_transfer_hndl,
@@ -319,8 +332,10 @@
     uint16_t retRespCnt = 0;
     uint8_t retTransferCRC = 0;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_get_pdr_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_pdr_resp*>(response->payload);
     resp->completion_code = completionCode;
     resp->next_record_handle = htole32(nextRecordHndl);
@@ -366,8 +381,10 @@
     uint16_t retRespCnt = 0;
     uint8_t retTransferCRC = 0;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_get_pdr_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_pdr_resp*>(response->payload);
     resp->completion_code = completionCode;
     resp->next_record_handle = htole32(nextRecordHndl);
@@ -476,6 +493,7 @@
 
     std::vector<uint8_t> responseMsg(hdrSize +
                                      PLDM_GET_PDR_REPOSITORY_INFO_RESP_BYTES);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = encode_get_pdr_repository_info_resp(
@@ -485,6 +503,7 @@
 
     EXPECT_EQ(rc, PLDM_SUCCESS);
     struct pldm_pdr_repository_info_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_pdr_repository_info_resp*>(
             response->payload);
 
@@ -529,8 +548,10 @@
 
     std::array<uint8_t, hdrSize + PLDM_GET_PDR_REPOSITORY_INFO_RESP_BYTES>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_pdr_repository_info_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_pdr_repository_info_resp*>(
             response->payload);
     resp->completion_code = completionCode;
@@ -582,8 +603,10 @@
 
     std::array<uint8_t, hdrSize + PLDM_GET_PDR_REPOSITORY_INFO_RESP_BYTES>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_pdr_repository_info_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_pdr_repository_info_resp*>(
             response->payload);
     resp->completion_code = completionCode;
@@ -715,8 +738,10 @@
     uint8_t reteffecter_data_size;
     uint8_t reteffecter_value[4];
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto req = reinterpret_cast<pldm_msg*>(requestMsg.data());
     struct pldm_set_numeric_effecter_value_req* request =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_set_numeric_effecter_value_req*>(
             req->payload);
 
@@ -730,6 +755,7 @@
         req, requestMsg.size() - hdrSize, &reteffecter_id,
         &reteffecter_data_size, reteffecter_value);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     uint32_t value = *(reinterpret_cast<uint32_t*>(reteffecter_value));
     EXPECT_EQ(rc, PLDM_SUCCESS);
     EXPECT_EQ(reteffecter_id, effecter_id);
@@ -754,8 +780,10 @@
     uint8_t reteffecter_data_size;
     uint8_t reteffecter_value[4];
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto req = reinterpret_cast<pldm_msg*>(requestMsg.data());
     struct pldm_set_numeric_effecter_value_req* request =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_set_numeric_effecter_value_req*>(
             req->payload);
 
@@ -765,6 +793,7 @@
 
     rc = decode_set_numeric_effecter_value_req(
         req, requestMsg.size() - hdrSize - 1, &reteffecter_id,
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         &reteffecter_data_size, reinterpret_cast<uint8_t*>(&reteffecter_value));
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_LENGTH);
 }
@@ -777,15 +806,18 @@
 
     std::vector<uint8_t> requestMsg(
         hdrSize + PLDM_SET_NUMERIC_EFFECTER_VALUE_MIN_REQ_BYTES + 1);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_set_numeric_effecter_value_req(
         0, effecter_id, effecter_data_size,
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(&effecter_value), request,
         PLDM_SET_NUMERIC_EFFECTER_VALUE_MIN_REQ_BYTES + 1);
     EXPECT_EQ(rc, PLDM_SUCCESS);
 
     struct pldm_set_numeric_effecter_value_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_set_numeric_effecter_value_req*>(
             request->payload);
     EXPECT_EQ(effecter_id, req->effecter_id);
@@ -799,6 +831,7 @@
 {
     std::vector<uint8_t> requestMsg(
         hdrSize + PLDM_SET_NUMERIC_EFFECTER_VALUE_MIN_REQ_BYTES);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_set_numeric_effecter_value_req(
@@ -807,6 +840,7 @@
 
     uint16_t effecter_value;
     rc = encode_set_numeric_effecter_value_req(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         0, 0, 6, reinterpret_cast<uint8_t*>(&effecter_value), request,
         PLDM_SET_NUMERIC_EFFECTER_VALUE_MIN_REQ_BYTES);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_DATA);
@@ -824,6 +858,7 @@
     memcpy(responseMsg.data() + hdrSize, &completion_code,
            sizeof(completion_code));
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = decode_set_numeric_effecter_value_resp(
@@ -838,6 +873,7 @@
     std::array<uint8_t, PLDM_SET_NUMERIC_EFFECTER_VALUE_RESP_BYTES>
         responseMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = decode_set_numeric_effecter_value_resp(response,
@@ -851,6 +887,7 @@
     std::array<uint8_t, sizeof(pldm_msg_hdr) +
                             PLDM_SET_NUMERIC_EFFECTER_VALUE_RESP_BYTES>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     uint8_t completionCode = 0;
 
@@ -875,6 +912,7 @@
                             sizeof(get_sensor_state_field) * 2>
         responseMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     uint8_t completionCode = 0;
     uint8_t comp_sensorCnt = 0x2;
@@ -889,6 +927,7 @@
         0, PLDM_SUCCESS, comp_sensorCnt, stateField.data(), response);
 
     struct pldm_get_state_sensor_readings_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_state_sensor_readings_resp*>(
             response->payload);
 
@@ -933,8 +972,10 @@
     uint8_t retcomp_sensorCnt = 0;
     std::array<get_sensor_state_field, 2> retstateField{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_get_state_sensor_readings_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_state_sensor_readings_resp*>(
             response->payload);
 
@@ -967,6 +1008,7 @@
                             sizeof(get_sensor_state_field) * 2>
         responseMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = decode_get_state_sensor_readings_resp(
@@ -986,6 +1028,7 @@
     std::array<get_sensor_state_field, 1> retstateField{};
 
     struct pldm_get_state_sensor_readings_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_state_sensor_readings_resp*>(
             response->payload);
 
@@ -1010,11 +1053,13 @@
     bitfield8_t sensorRearm;
     sensorRearm.byte = 0x03;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
     auto rc = encode_get_state_sensor_readings_req(0, sensorId, sensorRearm, 0,
                                                    request);
 
     struct pldm_get_state_sensor_readings_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_state_sensor_readings_req*>(
             request->payload);
 
@@ -1047,9 +1092,11 @@
     bitfield8_t retsensorRearm;
     uint8_t retreserved;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     struct pldm_get_state_sensor_readings_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_state_sensor_readings_req*>(
             request->payload);
 
@@ -1083,9 +1130,11 @@
     bitfield8_t retsensorRearm;
     uint8_t retreserved;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     struct pldm_get_state_sensor_readings_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_state_sensor_readings_req*>(
             request->payload);
 
@@ -1105,6 +1154,7 @@
 
     std::array<uint8_t, hdrSize + PLDM_EVENT_MESSAGE_BUFFER_SIZE_REQ_BYTES>
         requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_event_message_buffer_size_req(0, eventBufferSize, request);
@@ -1123,8 +1173,10 @@
     uint8_t retCompletionCode;
     uint16_t retMaxBufferSize = 0;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_event_message_buffer_size_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_event_message_buffer_size_resp*>(
             response->payload);
 
@@ -1151,8 +1203,10 @@
     uint8_t retCompletionCode;
     uint16_t retMaxBufferSize = 0;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_event_message_buffer_size_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_event_message_buffer_size_resp*>(
             response->payload);
     resp->completion_code = completionCode;
@@ -1174,11 +1228,13 @@
     std::array<uint8_t, hdrSize + PLDM_EVENT_MESSAGE_SUPPORTED_REQ_BYTES>
         requestMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_event_message_supported_req(0, formatVersion, request);
 
     struct pldm_event_message_supported_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_event_message_supported_req*>(
             request->payload);
 
@@ -1194,6 +1250,7 @@
     std::array<uint8_t, hdrSize + PLDM_EVENT_MESSAGE_SUPPORTED_REQ_BYTES +
                             sizeof(eventData)>
         requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_event_message_supported_req(0, formatVersion, request);
@@ -1223,8 +1280,10 @@
     bitfield8_t retSynchConfigSupport;
     uint8_t retEventClass[eventClassCount] = {0};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_event_message_supported_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_event_message_supported_resp*>(
             response->payload);
 
@@ -1268,8 +1327,10 @@
     bitfield8_t retSynchConfigSupport;
     uint8_t retEventClass[eventClassCount] = {0};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_event_message_supported_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_event_message_supported_resp*>(
             response->payload);
 
@@ -1307,8 +1368,10 @@
     bitfield8_t retSynchConfigSupport;
     uint8_t retEventClass[eventClassCount] = {0};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_event_message_supported_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_event_message_supported_resp*>(
             response->payload);
     resp->completion_code = completionCode;
@@ -1344,6 +1407,7 @@
     std::array<uint8_t,
                hdrSize + PLDM_POLL_FOR_PLATFORM_EVENT_MESSAGE_REQ_BYTES>
         requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_poll_for_platform_event_message_req(
@@ -1386,6 +1450,7 @@
     std::array<uint8_t,
                hdrSize + PLDM_POLL_FOR_PLATFORM_EVENT_MESSAGE_REQ_BYTES>
         requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_poll_for_platform_event_message_req(
@@ -1442,6 +1507,7 @@
     };
     const uint32_t respMsgLen = 23;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     uint8_t retCompletionCode;
@@ -1486,6 +1552,7 @@
     };
     const uint32_t respMsgLen = 4;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     uint8_t retCompletionCode;
@@ -1512,6 +1579,7 @@
     eventId = 0x0000;
     responseMsg[5] = 0x00;
     responseMsg[6] = 0x00;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     rc = decode_poll_for_platform_event_message_resp(
@@ -1558,6 +1626,7 @@
     };
     // const uint32_t respMsgLen = 23;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = decode_poll_for_platform_event_message_resp(
@@ -1594,6 +1663,7 @@
     std::vector<uint8_t> requestMsg{0x1,  0x0,  0x0,  0x1,  PLDM_GET_FIRSTPART,
                                     0x44, 0x33, 0x22, 0x11, 0x00,
                                     0x00};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     uint8_t retFormatVersion;
@@ -1622,6 +1692,7 @@
     std::vector<uint8_t> requestMsg{0x1,  0x0,  0x0,  0x1,  PLDM_GET_NEXTPART,
                                     0x44, 0x33, 0x22, 0x11, 0xff,
                                     0xff};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     uint8_t retFormatVersion;
@@ -1650,6 +1721,7 @@
     std::vector<uint8_t> requestMsg{
         0x1,  0x0,  0x0,  0x1, PLDM_ACKNOWLEDGEMENT_ONLY, 0x44, 0x33,
         0x22, 0x11, 0xff, 0xff};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     uint8_t retFormatVersion;
@@ -1674,6 +1746,7 @@
     std::vector<uint8_t> requestMsg{0x1,  0x0,  0x0,  0x1,  PLDM_GET_FIRSTPART,
                                     0x44, 0x33, 0x22, 0x11, 0x66,
                                     0x55};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     uint8_t retFormatVersion;
@@ -1778,6 +1851,7 @@
         PLDM_POLL_FOR_PLATFORM_EVENT_MESSAGE_RESP_BYTES + eventDataSize + 4;
 
     std::array<uint8_t, hdrSize + payloadLength> responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = encode_poll_for_platform_event_message_resp(
@@ -1839,6 +1913,7 @@
         PLDM_POLL_FOR_PLATFORM_EVENT_MESSAGE_MIN_RESP_BYTES;
 
     std::array<uint8_t, hdrSize + payloadLength> responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = encode_poll_for_platform_event_message_resp(
@@ -1878,6 +1953,7 @@
         PLDM_POLL_FOR_PLATFORM_EVENT_MESSAGE_MIN_RESP_BYTES;
 
     std::array<uint8_t, hdrSize + payloadLength> responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = encode_poll_for_platform_event_message_resp(
@@ -1925,6 +2001,7 @@
                             PLDM_POLL_FOR_PLATFORM_EVENT_MESSAGE_RESP_BYTES +
                             eventDataSize + 4>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = encode_poll_for_platform_event_message_resp(
@@ -1986,6 +2063,7 @@
         PLDM_POLL_FOR_PLATFORM_EVENT_MESSAGE_RESP_BYTES + eventDataSize + 4;
 
     std::array<uint8_t, hdrSize + payloadLength> responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = encode_poll_for_platform_event_message_resp(
@@ -2014,8 +2092,10 @@
     uint8_t retEventClass = 0;
     size_t retEventDataOffset = 0;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto req = reinterpret_cast<pldm_msg*>(requestMsg.data());
     struct pldm_platform_event_message_req* request =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_platform_event_message_req*>(req->payload);
 
     uint8_t formatVersion = 0x01;
@@ -2047,6 +2127,7 @@
                hdrSize + PLDM_PLATFORM_EVENT_MESSAGE_MIN_REQ_BYTES +
                    PLDM_PLATFORM_EVENT_MESSAGE_STATE_SENSOR_STATE_REQ_BYTES - 1>
         requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto req = reinterpret_cast<pldm_msg*>(requestMsg.data());
     uint8_t retFormatVersion;
     uint8_t retTid = 0;
@@ -2071,6 +2152,7 @@
                hdrSize + PLDM_PLATFORM_EVENT_MESSAGE_MIN_REQ_BYTES +
                    PLDM_PLATFORM_EVENT_MESSAGE_STATE_SENSOR_STATE_REQ_BYTES - 1>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     uint8_t completionCode = 0;
     uint8_t instanceId = 0x01;
@@ -2101,13 +2183,16 @@
                             sizeof(eventData)>
         requestMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
     auto rc = encode_platform_event_message_req(
         0, formatVersion, Tid, eventClass,
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(&eventData), sizeof(eventData), request,
         sizeof(eventData) + PLDM_PLATFORM_EVENT_MESSAGE_MIN_REQ_BYTES);
 
     struct pldm_platform_event_message_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_platform_event_message_req*>(
             request->payload);
 
@@ -2131,14 +2216,17 @@
     std::array<uint8_t, hdrSize + PLDM_PLATFORM_EVENT_MESSAGE_MIN_REQ_BYTES +
                             sizeof(eventData)>
         requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_platform_event_message_req(
         0, formatVersion, Tid, eventClass,
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(&eventData), sz_eventData, nullptr,
         payloadLen);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_DATA);
     rc = encode_platform_event_message_req(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         0, 0, Tid, eventClass, reinterpret_cast<uint8_t*>(&eventData),
         sz_eventData, request, payloadLen);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_DATA);
@@ -2147,6 +2235,7 @@
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_DATA);
     rc = encode_platform_event_message_req(
         0, formatVersion, Tid, eventClass,
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(&eventData), sz_eventData, request, 0);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_LENGTH);
 }
@@ -2162,8 +2251,10 @@
     uint8_t retcompletionCode;
     uint8_t retplatformEventStatus;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_platform_event_message_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_platform_event_message_resp*>(
             response->payload);
 
@@ -2187,8 +2278,10 @@
     uint8_t completionCode = PLDM_SUCCESS;
     uint8_t platformEventStatus = 0x01;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_platform_event_message_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_platform_event_message_resp*>(
             response->payload);
     resp->completion_code = completionCode;
@@ -2224,6 +2317,7 @@
     uint8_t retSensorEventClassType;
     size_t sensorOpDataOffset = sizeof(sensorId) + sizeof(sensorEventClassType);
     auto rc = decode_sensor_event_data(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(eventData), eventDataArr.size(),
         &retSensorId, &retSensorEventClassType, &retSensorOpDataOffset);
     EXPECT_EQ(rc, PLDM_SUCCESS);
@@ -2251,6 +2345,7 @@
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_DATA);
 
     rc = decode_sensor_event_data(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(eventDataArr.data()),
         eventDataArr.size() -
             PLDM_SENSOR_EVENT_NUMERIC_SENSOR_STATE_MAX_DATA_LENGTH,
@@ -2260,18 +2355,21 @@
     eventData->sensor_event_class_type = PLDM_SENSOR_OP_STATE;
 
     rc = decode_sensor_event_data(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(eventDataArr.data()), eventDataArr.size(),
         &retSensorId, &retSensorEventClassType, &retSensorOpDataOffset);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_LENGTH);
 
     eventData->sensor_event_class_type = PLDM_STATE_SENSOR_STATE;
     rc = decode_sensor_event_data(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(eventDataArr.data()), eventDataArr.size(),
         &retSensorId, &retSensorEventClassType, &retSensorOpDataOffset);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_LENGTH);
 
     eventData->sensor_event_class_type = PLDM_NUMERIC_SENSOR_STATE;
     rc = decode_sensor_event_data(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(eventDataArr.data()),
         eventDataArr.size() + 1, &retSensorId, &retSensorEventClassType,
         &retSensorOpDataOffset);
@@ -2296,6 +2394,7 @@
     struct pldm_message_poll_event poll_event = {};
 
     auto rc = decode_pldm_message_poll_event_data(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(eventData.data()), eventData.size(),
         &poll_event);
 
@@ -2324,10 +2423,12 @@
     EXPECT_EQ(rc, -EINVAL);
 
     rc = decode_pldm_message_poll_event_data(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(eventData.data()), eventData.size(), NULL);
     EXPECT_EQ(rc, -EINVAL);
 
     rc = decode_pldm_message_poll_event_data(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(eventData.data()), eventData.size() - 1,
         &poll_event);
     EXPECT_EQ(rc, -EOVERFLOW);
@@ -2336,6 +2437,7 @@
     eventData[1] = 0x00;
     eventData[2] = 0x00;
     rc = decode_pldm_message_poll_event_data(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(eventData.data()), eventData.size(),
         &poll_event);
 
@@ -2345,6 +2447,7 @@
     eventData[1] = 0xff;
     eventData[2] = 0xff;
     rc = decode_pldm_message_poll_event_data(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(eventData.data()), eventData.size(),
         &poll_event);
 
@@ -2365,6 +2468,7 @@
     poll_event.data_transfer_handle = 0x11223344;
 
     int rc = encode_pldm_message_poll_event_data(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         &poll_event, reinterpret_cast<uint8_t*>(eventData.data()),
         eventData.size());
 
@@ -2373,9 +2477,10 @@
     struct pldm_msgbuf _buf;
     struct pldm_msgbuf* buf = &_buf;
 
-    rc = pldm_msgbuf_init_cc(buf, PLDM_MSG_POLL_EVENT_LENGTH,
-                             reinterpret_cast<uint8_t*>(eventData.data()),
-                             eventData.size());
+    rc = pldm_msgbuf_init_cc(
+        buf, PLDM_MSG_POLL_EVENT_LENGTH,
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
+        reinterpret_cast<uint8_t*>(eventData.data()), eventData.size());
     EXPECT_EQ(rc, PLDM_SUCCESS);
 
     uint8_t retFormatVersion;
@@ -2412,12 +2517,14 @@
 
     poll_event.event_id = 0x0000;
     rc = encode_pldm_message_poll_event_data(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         &poll_event, reinterpret_cast<uint8_t*>(eventData.data()),
         eventData.size());
     EXPECT_EQ(rc, -EPROTO);
 
     poll_event.event_id = 0xffff;
     rc = encode_pldm_message_poll_event_data(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         &poll_event, reinterpret_cast<uint8_t*>(eventData.data()),
         eventData.size());
     EXPECT_EQ(rc, -EPROTO);
@@ -2438,6 +2545,7 @@
 
     uint8_t retPresentState;
     uint8_t retPreviousState;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto rc = decode_sensor_op_data(reinterpret_cast<uint8_t*>(sensorData),
                                     eventDataArr.size(), &retPresentState,
                                     &retPreviousState);
@@ -2457,11 +2565,13 @@
 
     std::array<uint8_t, PLDM_SENSOR_EVENT_SENSOR_OP_STATE_DATA_LENGTH>
         sensorData{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     rc = decode_sensor_op_data(reinterpret_cast<uint8_t*>(sensorData.data()),
                                sensorDataLength + 1, &presentOpState,
                                &previousOpState);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_LENGTH);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     rc = decode_sensor_op_data(reinterpret_cast<uint8_t*>(sensorData.data()),
                                sensorDataLength, nullptr, &previousOpState);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_DATA);
@@ -2484,6 +2594,7 @@
     uint8_t retSensorOffset;
     uint8_t retEventState;
     uint8_t retPreviousState;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto rc = decode_state_sensor_data(reinterpret_cast<uint8_t*>(sensorData),
                                        eventDataArr.size(), &retSensorOffset,
                                        &retEventState, &retPreviousState);
@@ -2505,11 +2616,13 @@
 
     std::array<uint8_t, PLDM_SENSOR_EVENT_STATE_SENSOR_STATE_DATA_LENGTH>
         sensorData{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     rc = decode_state_sensor_data(reinterpret_cast<uint8_t*>(sensorData.data()),
                                   sensorDataLength - 1, &sensorOffset,
                                   &eventState, &previousEventState);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_LENGTH);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     rc = decode_state_sensor_data(reinterpret_cast<uint8_t*>(sensorData.data()),
                                   sensorDataLength, &sensorOffset, nullptr,
                                   &previousEventState);
@@ -2544,6 +2657,7 @@
     uint32_t retPresentReading;
 
     auto rc = decode_numeric_sensor_data(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(sensorData), sensorDataLength,
         &retEventState, &retPreviousEventState, &retSensorDataSize,
         &retPresentReading);
@@ -2563,6 +2677,7 @@
     sensorData->sensor_data_size = sensorDataSize;
     sensorDataLength = PLDM_SENSOR_EVENT_NUMERIC_SENSOR_STATE_16BIT_DATA_LENGTH;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     rc = decode_numeric_sensor_data(reinterpret_cast<uint8_t*>(sensorData),
                                     sensorDataLength, &retEventState,
                                     &retPreviousEventState, &retSensorDataSize,
@@ -2590,6 +2705,7 @@
     std::array<uint8_t, PLDM_SENSOR_EVENT_NUMERIC_SENSOR_STATE_MAX_DATA_LENGTH>
         sensorData{};
     rc = decode_numeric_sensor_data(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(sensorData.data()), sensorDataLength - 1,
         &eventState, &previousEventState, &sensorDataSize, &presentReading);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_LENGTH);
@@ -2598,12 +2714,14 @@
         (struct pldm_sensor_event_numeric_sensor_state*)sensorData.data();
     numericSensorData->sensor_data_size = PLDM_SENSOR_DATA_SIZE_UINT8;
     rc = decode_numeric_sensor_data(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(sensorData.data()), sensorDataLength,
         &eventState, &previousEventState, &sensorDataSize, &presentReading);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_LENGTH);
 
     numericSensorData->sensor_data_size = PLDM_SENSOR_DATA_SIZE_UINT16;
     rc = decode_numeric_sensor_data(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(sensorData.data()), sensorDataLength,
         &eventState, &previousEventState, &sensorDataSize, &presentReading);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_LENGTH);
@@ -2616,11 +2734,13 @@
 
     uint16_t effecter_id = 0xab01;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_get_numeric_effecter_value_req(0, effecter_id, request);
 
     struct pldm_get_numeric_effecter_value_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_numeric_effecter_value_req*>(
             request->payload);
 
@@ -2642,8 +2762,10 @@
     std::array<uint8_t, hdrSize + PLDM_GET_NUMERIC_EFFECTER_VALUE_REQ_BYTES>
         requestMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
     struct pldm_get_numeric_effecter_value_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_numeric_effecter_value_req*>(
             request->payload);
 
@@ -2669,8 +2791,10 @@
 
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_DATA);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
     struct pldm_set_numeric_effecter_value_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_set_numeric_effecter_value_req*>(
             request->payload);
 
@@ -2697,15 +2821,19 @@
     std::array<uint8_t,
                hdrSize + PLDM_GET_NUMERIC_EFFECTER_VALUE_MIN_RESP_BYTES + 6>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = encode_get_numeric_effecter_value_resp(
         0, completionCode, effecter_dataSize, effecter_operState,
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(&pendingValue),
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(&presentValue), response,
         responseMsg.size() - hdrSize);
 
     struct pldm_get_numeric_effecter_value_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_numeric_effecter_value_resp*>(
             response->payload);
 
@@ -2728,6 +2856,7 @@
     std::array<uint8_t,
                hdrSize + PLDM_GET_NUMERIC_EFFECTER_VALUE_MIN_RESP_BYTES + 2>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     uint8_t pendingValue = 0x01;
@@ -2739,7 +2868,9 @@
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_DATA);
 
     rc = encode_get_numeric_effecter_value_resp(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         0, PLDM_SUCCESS, 6, 9, reinterpret_cast<uint8_t*>(&pendingValue),
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(&presentValue), response,
         responseMsg.size() - hdrSize);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_DATA);
@@ -2749,7 +2880,9 @@
 
     rc = encode_get_numeric_effecter_value_resp(
         0, PLDM_SUCCESS, effecter_dataSize, effecter_operState,
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(&pendingValue),
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(&presentValue), response,
         responseMsg.size() - hdrSize);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_LENGTH);
@@ -2773,8 +2906,10 @@
     uint8_t retpendingValue[2];
     uint8_t retpresentValue[2];
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_get_numeric_effecter_value_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_numeric_effecter_value_resp*>(
             response->payload);
 
@@ -2798,7 +2933,9 @@
     EXPECT_EQ(completionCode, retcompletionCode);
     EXPECT_EQ(effecter_dataSize, reteffecter_dataSize);
     EXPECT_EQ(effecter_operState, reteffecter_operState);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     EXPECT_EQ(pendingValue, *(reinterpret_cast<uint16_t*>(retpendingValue)));
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     EXPECT_EQ(presentValue, *(reinterpret_cast<uint16_t*>(retpresentValue)));
 }
 
@@ -2826,8 +2963,10 @@
     uint8_t retpendingValue[2];
     uint8_t retpresentValue[2];
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_get_numeric_effecter_value_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_numeric_effecter_value_resp*>(
             response->payload);
 
@@ -2870,11 +3009,13 @@
         eventDataArr{};
 
     struct pldm_pdr_repository_chg_event_data* eventData =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_pdr_repository_chg_event_data*>(
             eventDataArr.data());
     eventData->event_data_format = eventDataFormat;
     eventData->number_of_change_records = numberOfChangeRecords;
     struct pldm_pdr_repository_change_record_data* changeRecord1 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_pdr_repository_change_record_data*>(
             eventData->change_records);
     changeRecord1->event_data_operation = eventDataOperation1;
@@ -2882,6 +3023,7 @@
     memcpy(changeRecord1->change_entry, &changeRecordArr1[0],
            changeRecordArr1.size() * sizeof(uint32_t));
     struct pldm_pdr_repository_change_record_data* changeRecord2 =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_pdr_repository_change_record_data*>(
             eventData->change_records +
             PLDM_PDR_REPOSITORY_CHANGE_RECORD_MIN_LENGTH +
@@ -2895,6 +3037,7 @@
     uint8_t retNumberOfChangeRecords{};
     size_t retChangeRecordDataOffset{0};
     auto rc = decode_pldm_pdr_repository_chg_event_data(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const uint8_t*>(eventData), eventDataArr.size(),
         &retEventDataFormat, &retNumberOfChangeRecords,
         &retChangeRecordDataOffset);
@@ -2903,6 +3046,7 @@
     EXPECT_EQ(retNumberOfChangeRecords, numberOfChangeRecords);
 
     const uint8_t* changeRecordData =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const uint8_t*>(changeRecord1);
     size_t changeRecordDataSize =
         eventDataArr.size() - PLDM_PDR_REPOSITORY_CHG_EVENT_MIN_LENGTH;
@@ -2911,6 +3055,7 @@
     size_t retChangeEntryDataOffset;
 
     rc = decode_pldm_pdr_repository_change_record_data(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const uint8_t*>(changeRecordData),
         changeRecordDataSize, &retEventDataOperation, &retNumberOfChangeEntries,
         &retChangeEntryDataOffset);
@@ -2925,6 +3070,7 @@
     changeRecordDataSize -= sizeof(uint32_t) * retNumberOfChangeEntries -
                             PLDM_PDR_REPOSITORY_CHANGE_RECORD_MIN_LENGTH;
     rc = decode_pldm_pdr_repository_change_record_data(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const uint8_t*>(changeRecordData),
         changeRecordDataSize, &retEventDataOperation, &retNumberOfChangeEntries,
         &retChangeEntryDataOffset);
@@ -2948,6 +3094,7 @@
 
     std::array<uint8_t, 2> eventData{};
     rc = decode_pldm_pdr_repository_chg_event_data(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const uint8_t*>(eventData.data()), 0, &eventDataFormat,
         &numberOfChangeRecords, &changeRecordDataOffset);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_LENGTH);
@@ -2962,6 +3109,7 @@
 
     std::array<uint8_t, 2> changeRecord{};
     rc = decode_pldm_pdr_repository_change_record_data(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const uint8_t*>(changeRecord.data()), 0,
         &eventDataOperation, &numberOfChangeEntries, &changeEntryDataOffset);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_LENGTH);
@@ -2975,11 +3123,13 @@
     uint16_t sensorId = 0x1234;
     bool8_t rearmEventState = 0x01;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
     auto rc =
         encode_get_sensor_reading_req(0, sensorId, rearmEventState, request);
 
     struct pldm_get_sensor_reading_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_sensor_reading_req*>(request->payload);
 
     EXPECT_EQ(rc, PLDM_SUCCESS);
@@ -3005,9 +3155,11 @@
     uint16_t retsensorId;
     bool8_t retrearmEventState;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     struct pldm_get_sensor_reading_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_sensor_reading_req*>(request->payload);
 
     req->sensor_id = htole16(sensorId);
@@ -3037,9 +3189,11 @@
     uint16_t retsensorId;
     bool8_t retrearmEventState;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     struct pldm_get_sensor_reading_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_sensor_reading_req*>(request->payload);
 
     req->sensor_id = htole16(sensorId);
@@ -3056,6 +3210,7 @@
     std::array<uint8_t, hdrSize + PLDM_GET_SENSOR_READING_MIN_RESP_BYTES>
         responseMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     uint8_t completionCode = 0;
@@ -3070,10 +3225,12 @@
     auto rc = encode_get_sensor_reading_resp(
         0, completionCode, sensor_dataSize, sensor_operationalState,
         sensor_event_messageEnable, presentState, previousState, eventState,
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(&presentReading), response,
         responseMsg.size() - hdrSize);
 
     struct pldm_get_sensor_reading_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_sensor_reading_resp*>(
             response->payload);
 
@@ -3086,6 +3243,7 @@
     EXPECT_EQ(previousState, resp->previous_state);
     EXPECT_EQ(eventState, resp->event_state);
     EXPECT_EQ(presentReading,
+              // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
               *(reinterpret_cast<uint8_t*>(&resp->present_reading[0])));
 }
 
@@ -3094,6 +3252,7 @@
     std::array<uint8_t, hdrSize + PLDM_GET_SENSOR_READING_MIN_RESP_BYTES + 3>
         responseMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     uint8_t presentReading = 0x1;
@@ -3105,6 +3264,7 @@
 
     rc = encode_get_sensor_reading_resp(
         0, PLDM_SUCCESS, 6, 1, 1, 1, 1, 1,
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(&presentReading), response,
         responseMsg.size() - hdrSize);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_DATA);
@@ -3113,6 +3273,7 @@
 
     rc = encode_get_sensor_reading_resp(
         0, PLDM_SUCCESS, sensor_dataSize, 1, 1, 1, 1, 1,
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(&presentReading), response,
         responseMsg.size() - hdrSize);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_LENGTH);
@@ -3141,8 +3302,10 @@
     uint8_t reteventState;
     uint8_t retpresentReading[4];
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_get_sensor_reading_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_sensor_reading_resp*>(
             response->payload);
 
@@ -3173,6 +3336,7 @@
     EXPECT_EQ(previousState, retpreviousState);
     EXPECT_EQ(eventState, reteventState);
     EXPECT_EQ(presentReading,
+              // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
               *(reinterpret_cast<uint32_t*>(retpresentReading)));
 }
 
@@ -3205,8 +3369,10 @@
     uint8_t retevent_state;
     uint8_t retpresentReading;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     struct pldm_get_sensor_reading_resp* resp =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_sensor_reading_resp*>(
             response->payload);
 
@@ -3223,6 +3389,7 @@
         response, responseMsg.size() - hdrSize, &retcompletionCode,
         &retsensor_dataSize, &retsensor_operationalState,
         &retsensor_event_messageEnable, &retpresent_state, &retprevious_state,
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         &retevent_state, reinterpret_cast<uint8_t*>(&retpresentReading));
 
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_LENGTH);
@@ -3238,6 +3405,7 @@
 
     std::vector<uint8_t> requestMsg(hdrSize +
                                     PLDM_SET_EVENT_RECEIVER_REQ_BYTES);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_set_event_receiver_req(
@@ -3246,6 +3414,7 @@
 
     EXPECT_EQ(rc, PLDM_SUCCESS);
     struct pldm_set_event_receiver_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_set_event_receiver_req*>(request->payload);
     EXPECT_EQ(eventMessageGlobalEnable, req->event_message_global_enable);
     EXPECT_EQ(transportProtocolType, req->transport_protocol_type);
@@ -3263,6 +3432,7 @@
 
     std::vector<uint8_t> requestMsg(hdrSize +
                                     PLDM_SET_EVENT_RECEIVER_REQ_BYTES);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_set_event_receiver_req(
@@ -3280,6 +3450,7 @@
     uint8_t retcompletion_code = 0;
     responseMsg[hdrSize] = PLDM_SUCCESS;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     auto rc = decode_set_event_receiver_resp(
         response, responseMsg.size() - sizeof(pldm_msg_hdr),
@@ -3294,6 +3465,7 @@
     std::array<uint8_t, hdrSize + PLDM_SET_EVENT_RECEIVER_RESP_BYTES>
         responseMsg{};
     uint8_t retcompletion_code = 0;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = decode_set_event_receiver_resp(
@@ -3313,6 +3485,7 @@
     std::array<uint8_t,
                sizeof(pldm_msg_hdr) + PLDM_SET_EVENT_RECEIVER_RESP_BYTES>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
     uint8_t completionCode = 0;
 
@@ -3340,8 +3513,10 @@
     uint8_t eventReceiverAddressInfo = 0x08;
     uint16_t heartbeatTimer = 0x78;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
     struct pldm_set_event_receiver_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_set_event_receiver_req*>(request->payload);
 
     req->event_message_global_enable = eventMessageGlobalEnable;
@@ -3380,8 +3555,10 @@
     uint8_t eventReceiverAddressInfo = 0x08;
     uint16_t heartbeatTimer = 0x78;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
     struct pldm_set_event_receiver_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_set_event_receiver_req*>(request->payload);
 
     req->event_message_global_enable = eventMessageGlobalEnable;
@@ -5033,6 +5210,7 @@
 
     constexpr uint16_t effecter_id = 0xab01;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_get_state_effecter_states_req(
@@ -5092,6 +5270,7 @@
 
     decltype(expectedResponseMsg) responseMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     std::array<get_effecter_state_field, comp_effecterCnt> stateField{
@@ -5163,6 +5342,7 @@
                             PLDM_GET_EFFECTER_STATE_FIELD_SIZE * 2>
         responseMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = decode_get_state_effecter_states_resp(
@@ -5363,10 +5543,12 @@
 
     size_t cperEventSize =
         sizeof(struct pldm_platform_cper_event) + eventDataSize;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto cper_event = reinterpret_cast<struct pldm_platform_cper_event*>(
         malloc(cperEventSize));
 
     auto rc = decode_pldm_platform_cper_event(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const void*>(eventData.data()), eventData.size(),
         cper_event, cperEventSize);
 
@@ -5401,6 +5583,7 @@
 
     size_t cperEventSize =
         sizeof(struct pldm_platform_cper_event) + eventDataSize;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto cperEvent = reinterpret_cast<struct pldm_platform_cper_event*>(
         malloc(cperEventSize));
 
@@ -5409,28 +5592,34 @@
     EXPECT_EQ(rc, -EINVAL);
 
     rc = decode_pldm_platform_cper_event(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const void*>(eventData.data()), eventData.size(), NULL,
         cperEventSize);
     EXPECT_EQ(rc, -EINVAL);
 
 #ifdef NDEBUG
     rc = decode_pldm_platform_cper_event(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(eventData.data()), eventData.size() - 1,
         cperEvent, cperEventSize);
     EXPECT_EQ(rc, -EOVERFLOW);
 #else
-    EXPECT_DEATH(decode_pldm_platform_cper_event(
-                     reinterpret_cast<uint8_t*>(eventData.data()),
-                     eventData.size() - 1, cperEvent, cperEventSize),
-                 "ctx->remaining >= 0");
+    EXPECT_DEATH(
+        decode_pldm_platform_cper_event(
+            // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
+            reinterpret_cast<uint8_t*>(eventData.data()), eventData.size() - 1,
+            cperEvent, cperEventSize),
+        "ctx->remaining >= 0");
 #endif
 
     rc = decode_pldm_platform_cper_event(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(eventData.data()), eventData.size(),
         cperEvent, cperEventSize - 1);
     EXPECT_EQ(rc, -EOVERFLOW);
 
     rc = decode_pldm_platform_cper_event(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<uint8_t*>(eventData.data()), eventData.size(),
         cperEvent, cperEventSize + 1);
     EXPECT_EQ(rc, 0);
@@ -5438,6 +5627,7 @@
     // Invalid CPER Event Format Type
     eventData[1] = 0x2;
     rc = decode_pldm_platform_cper_event(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const void*>(eventData.data()), eventData.size(),
         cperEvent, cperEventSize);
 
@@ -5447,6 +5637,7 @@
     eventData[1] = 0x1;
     eventData[2] = 3;
     rc = decode_pldm_platform_cper_event(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const void*>(eventData.data()), eventData.size(),
         cperEvent, cperEventSize);
 
@@ -5454,6 +5645,7 @@
 
     eventData[2] = 5;
     rc = decode_pldm_platform_cper_event(
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<const void*>(eventData.data()), eventData.size(),
         cperEvent, cperEventSize);
 
diff --git a/tests/oem/ibm/fileio.cpp b/tests/oem/ibm/fileio.cpp
index 1e57f2d..16ef34e 100644
--- a/tests/oem/ibm/fileio.cpp
+++ b/tests/oem/ibm/fileio.cpp
@@ -40,6 +40,7 @@
     uint32_t retLength = 0;
     uint64_t retAddress = 0;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     // Invoke decode the read file memory request
@@ -68,6 +69,7 @@
 
     std::array<uint8_t, PLDM_RW_FILE_MEM_REQ_BYTES> requestMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     // Address is NULL
@@ -87,6 +89,7 @@
         responseMsg{};
     uint32_t length = 0xff00ee11;
     uint32_t lengthLe = htole32(length);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     // ReadFileIntoMemory
@@ -121,6 +124,7 @@
     std::array<uint8_t, sizeof(pldm_msg_hdr) + PLDM_RW_FILE_MEM_RESP_BYTES>
         responseMsg{};
     uint32_t length = 0;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     // ReadFileIntoMemory
@@ -162,6 +166,7 @@
     uint8_t retCompletionCode = 0;
     uint32_t retLength = 0;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     // Invoke decode the read file memory response
@@ -183,6 +188,7 @@
 
     std::array<uint8_t, PLDM_RW_FILE_MEM_RESP_BYTES> responseMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     // Payload length is invalid
@@ -204,6 +210,7 @@
     uint32_t lengthLe = htole32(length);
     uint64_t addressLe = htole64(address);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc =
@@ -264,6 +271,7 @@
     uint8_t retTransferOpFlag = 0;
     uint8_t retTableType = 0;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     // Invoke decode get file table request
@@ -290,6 +298,7 @@
 
     std::array<uint8_t, PLDM_GET_FILE_TABLE_REQ_BYTES> requestMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     // TableType is NULL
@@ -317,6 +326,7 @@
                                     sizeof(transferFlag) + fileTable.size();
 
     std::array<uint8_t, sizeof(pldm_msg_hdr) + responseSize> responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     // GetFileTable
@@ -353,6 +363,7 @@
                                     sizeof(transferFlag);
 
     std::array<uint8_t, sizeof(pldm_msg_hdr) + responseSize> responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     // GetFileTable
@@ -375,12 +386,14 @@
     uint8_t transferOpFlag = 0x01;
     uint8_t tableType = PLDM_FILE_ATTRIBUTE_TABLE;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
     auto rc = encode_get_file_table_req(0, transferHandle, transferOpFlag,
                                         tableType, request);
     EXPECT_EQ(rc, PLDM_SUCCESS);
 
     struct pldm_get_file_table_req* req =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<struct pldm_get_file_table_req*>(request->payload);
     EXPECT_EQ(transferHandle, le32toh(req->transfer_handle));
     EXPECT_EQ(transferOpFlag, req->operation_flag);
@@ -409,9 +422,11 @@
     std::vector<uint8_t> responseMsg(
         hdrSize + PLDM_GET_FILE_TABLE_MIN_RESP_BYTES + fileTableData.size());
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
     size_t payload_length = responseMsg.size() - hdrSize;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto resp = reinterpret_cast<struct pldm_get_file_table_resp*>(
         responsePtr->payload);
 
@@ -450,6 +465,7 @@
     std::vector<uint8_t> responseMsg(
         hdrSize + PLDM_GET_FILE_TABLE_MIN_RESP_BYTES + fileTableData.size());
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = decode_get_file_table_resp(
@@ -470,8 +486,10 @@
     std::array<uint8_t, PLDM_READ_FILE_REQ_BYTES + sizeof(pldm_msg_hdr)>
         requestMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
     size_t payload_length = requestMsg.size() - sizeof(pldm_msg_hdr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_read_file_req*>(requestPtr->payload);
 
     // Random value for fileHandle, offset and length
@@ -506,8 +524,10 @@
 
     std::vector<uint8_t> requestMsg(PLDM_WRITE_FILE_REQ_BYTES +
                                     sizeof(pldm_msg_hdr) + length);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
     size_t payload_length = requestMsg.size() - sizeof(pldm_msg_hdr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_write_file_req*>(requestPtr->payload);
 
     size_t fileDataOffset =
@@ -541,9 +561,11 @@
 
     std::vector<uint8_t> responseMsg(PLDM_READ_FILE_RESP_BYTES +
                                      sizeof(pldm_msg_hdr) + length);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
     size_t payload_length = responseMsg.size() - sizeof(pldm_msg_hdr);
     auto response =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<pldm_read_file_resp*>(responsePtr->payload);
 
     response->completion_code = completionCode;
@@ -570,9 +592,11 @@
 {
     std::array<uint8_t, PLDM_WRITE_FILE_RESP_BYTES + sizeof(pldm_msg_hdr)>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
     size_t payload_length = responseMsg.size() - sizeof(pldm_msg_hdr);
     auto response =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<pldm_write_file_resp*>(responsePtr->payload);
 
     uint8_t completionCode = PLDM_SUCCESS;
@@ -602,6 +626,7 @@
     // Bad decode response for read file
     std::vector<uint8_t> responseMsg(PLDM_READ_FILE_RESP_BYTES +
                                      sizeof(pldm_msg_hdr) + length);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     // Request payload message is missing
@@ -617,6 +642,7 @@
     // Bad decode response for write file
     std::array<uint8_t, PLDM_WRITE_FILE_RESP_BYTES + sizeof(pldm_msg_hdr)>
         responseMsgWr{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responseWr = reinterpret_cast<pldm_msg*>(responseMsgWr.data());
 
     // Request payload message is missing
@@ -637,6 +663,7 @@
     // Bad decode request for read file
     std::array<uint8_t, PLDM_READ_FILE_REQ_BYTES + sizeof(pldm_msg_hdr)>
         requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     // Request payload message is missing
@@ -650,6 +677,7 @@
     // Bad decode request for write file
     size_t fileDataOffset = 0;
     std::array<uint8_t, PLDM_WRITE_FILE_REQ_BYTES> requestMsgWr{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestWr = reinterpret_cast<pldm_msg*>(requestMsgWr.data());
 
     // Request payload message is missing
@@ -670,8 +698,10 @@
 
     std::vector<uint8_t> responseMsg(PLDM_READ_FILE_RESP_BYTES +
                                      sizeof(pldm_msg_hdr) + length);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
     auto response =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<pldm_read_file_resp*>(responsePtr->payload);
 
     // ReadFile
@@ -693,8 +723,10 @@
     std::array<uint8_t, sizeof(pldm_msg_hdr) + PLDM_WRITE_FILE_RESP_BYTES>
         responseMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
     auto response =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<pldm_write_file_resp*>(responsePtr->payload);
 
     // WriteFile
@@ -716,7 +748,9 @@
     uint32_t fileHandle = 0x12345678;
     uint32_t offset = 0x87654321;
     uint32_t length = 0x13245768;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_read_file_req*>(requestPtr->payload);
 
     // ReadFile
@@ -740,7 +774,9 @@
 
     std::vector<uint8_t> requestMsg(PLDM_WRITE_FILE_REQ_BYTES +
                                     sizeof(pldm_msg_hdr) + length);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_write_file_req*>(requestPtr->payload);
 
     // WriteFile
@@ -765,6 +801,7 @@
 
     std::array<uint8_t, sizeof(pldm_msg_hdr) + PLDM_READ_FILE_REQ_BYTES>
         requestMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     // ReadFile check invalid file length
@@ -775,6 +812,7 @@
     // Bad encode request for write file
     std::array<uint8_t, sizeof(pldm_msg_hdr) + PLDM_WRITE_FILE_REQ_BYTES>
         requestMsgWr{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestWr = reinterpret_cast<pldm_msg*>(requestMsgWr.data());
 
     // WriteFile check for invalid file length
@@ -790,6 +828,7 @@
 
     std::array<uint8_t, sizeof(pldm_msg_hdr) + PLDM_READ_FILE_RESP_BYTES>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     // ReadFile
@@ -805,6 +844,7 @@
     // Bad encode response for write file
     std::array<uint8_t, sizeof(pldm_msg_hdr) + PLDM_WRITE_FILE_RESP_BYTES>
         responseMsgWr{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responseWr = reinterpret_cast<pldm_msg*>(responseMsgWr.data());
 
     // WriteFile
@@ -824,8 +864,10 @@
                PLDM_RW_FILE_BY_TYPE_MEM_REQ_BYTES + sizeof(pldm_msg_hdr)>
         requestMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
     size_t payload_length = requestMsg.size() - sizeof(pldm_msg_hdr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_read_write_file_by_type_memory_req*>(
         requestPtr->payload);
 
@@ -867,8 +909,10 @@
                PLDM_RW_FILE_BY_TYPE_MEM_RESP_BYTES + sizeof(pldm_msg_hdr)>
         responseMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
     size_t payload_length = responseMsg.size() - sizeof(pldm_msg_hdr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_read_write_file_by_type_memory_resp*>(
         responsePtr->payload);
 
@@ -908,6 +952,7 @@
                PLDM_RW_FILE_BY_TYPE_MEM_REQ_BYTES + sizeof(pldm_msg_hdr)>
         requestMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     // Address is NULL
@@ -936,6 +981,7 @@
                PLDM_RW_FILE_BY_TYPE_MEM_RESP_BYTES + sizeof(pldm_msg_hdr)>
         responseMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     // Length is NULL
@@ -966,6 +1012,7 @@
     uint32_t lengthLe = htole32(length);
     uint64_t addressLe = htole64(address);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_rw_file_by_type_memory_req(
@@ -1004,6 +1051,7 @@
     uint32_t lengthLe = htole32(length);
     uint8_t completionCode = 0x0;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = encode_rw_file_by_type_memory_resp(
@@ -1028,6 +1076,7 @@
                sizeof(pldm_msg_hdr) + PLDM_RW_FILE_BY_TYPE_MEM_RESP_BYTES>
         responseMsg{};
     uint32_t length = 0;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     // completion code is PLDM_ERROR
@@ -1069,8 +1118,10 @@
     std::array<uint8_t, PLDM_NEW_FILE_REQ_BYTES + sizeof(pldm_msg_hdr)>
         requestMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
     size_t payload_length = requestMsg.size() - sizeof(pldm_msg_hdr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_new_file_req*>(requestPtr->payload);
 
     // Random value for fileHandle and length
@@ -1101,8 +1152,10 @@
     std::array<uint8_t, PLDM_NEW_FILE_RESP_BYTES + sizeof(pldm_msg_hdr)>
         responseMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
     size_t payload_length = responseMsg.size() - sizeof(pldm_msg_hdr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_new_file_resp*>(responsePtr->payload);
 
     // Random value for completion code
@@ -1134,6 +1187,7 @@
     std::array<uint8_t, PLDM_NEW_FILE_REQ_BYTES + sizeof(pldm_msg_hdr)>
         requestMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     // Payload length is invalid
@@ -1152,6 +1206,7 @@
     std::array<uint8_t, PLDM_NEW_FILE_RESP_BYTES + sizeof(pldm_msg_hdr)>
         responseMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     // Payload length is invalid
@@ -1171,6 +1226,7 @@
     uint32_t fileHandleLe = htole32(fileHandle);
     uint32_t lengthLe = htole32(length);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_new_file_req(0, fileType, fileHandle, length, request);
@@ -1195,6 +1251,7 @@
 
     uint8_t completionCode = 0x0;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = encode_new_file_resp(0, completionCode, response);
@@ -1212,6 +1269,7 @@
 {
     std::array<uint8_t, sizeof(pldm_msg_hdr) + PLDM_NEW_FILE_RESP_BYTES>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     // completion code is PLDM_ERROR
@@ -1247,8 +1305,10 @@
     std::array<uint8_t, PLDM_RW_FILE_BY_TYPE_REQ_BYTES + sizeof(pldm_msg_hdr)>
         requestMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
     size_t payload_length = requestMsg.size() - sizeof(pldm_msg_hdr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_read_write_file_by_type_req*>(
         requestPtr->payload);
 
@@ -1284,8 +1344,10 @@
     std::array<uint8_t, PLDM_RW_FILE_BY_TYPE_RESP_BYTES + sizeof(pldm_msg_hdr)>
         responseMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
     size_t payload_length = responseMsg.size() - sizeof(pldm_msg_hdr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_read_write_file_by_type_resp*>(
         responsePtr->payload);
 
@@ -1323,6 +1385,7 @@
     std::array<uint8_t, PLDM_RW_FILE_BY_TYPE_REQ_BYTES + sizeof(pldm_msg_hdr)>
         requestMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     // Payload length is invalid
@@ -1343,6 +1406,7 @@
     std::array<uint8_t, PLDM_RW_FILE_BY_TYPE_RESP_BYTES + sizeof(pldm_msg_hdr)>
         responseMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     // Length is NULL
@@ -1369,6 +1433,7 @@
     uint32_t offsetLe = htole32(offset);
     uint32_t lengthLe = htole32(length);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_rw_file_by_type_req(0, PLDM_READ_FILE_BY_TYPE, fileType,
@@ -1400,6 +1465,7 @@
     uint32_t length = 0x13245768;
     uint32_t lengthLe = htole32(length);
     uint8_t completionCode = 0x0;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = encode_rw_file_by_type_resp(0, PLDM_READ_FILE_BY_TYPE,
@@ -1422,6 +1488,7 @@
     std::array<uint8_t, sizeof(pldm_msg_hdr) + PLDM_RW_FILE_BY_TYPE_RESP_BYTES>
         responseMsg{};
     uint32_t length = 0;
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     // completion code is PLDM_ERROR
@@ -1461,8 +1528,10 @@
     std::array<uint8_t, PLDM_FILE_ACK_REQ_BYTES + sizeof(pldm_msg_hdr)>
         requestMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
     size_t payload_length = requestMsg.size() - sizeof(pldm_msg_hdr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_file_ack_req*>(requestPtr->payload);
 
     // Random value for fileHandle
@@ -1493,8 +1562,10 @@
     std::array<uint8_t, PLDM_FILE_ACK_RESP_BYTES + sizeof(pldm_msg_hdr)>
         responseMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
     size_t payload_length = responseMsg.size() - sizeof(pldm_msg_hdr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_file_ack_resp*>(responsePtr->payload);
 
     // Random value for completion code
@@ -1526,6 +1597,7 @@
     std::array<uint8_t, PLDM_FILE_ACK_REQ_BYTES + sizeof(pldm_msg_hdr)>
         requestMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     // Payload length is invalid
@@ -1545,6 +1617,7 @@
     std::array<uint8_t, PLDM_FILE_ACK_RESP_BYTES + sizeof(pldm_msg_hdr)>
         responseMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     // Payload length is invalid
@@ -1563,6 +1636,7 @@
     uint16_t fileTypeLe = htole16(fileType);
     uint32_t fileHandleLe = htole32(fileHandle);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_file_ack_req(0, fileType, fileHandle, fileStatus, request);
@@ -1584,6 +1658,7 @@
 
     uint8_t completionCode = 0x0;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = encode_file_ack_resp(0, completionCode, response);
@@ -1601,6 +1676,7 @@
 {
     std::array<uint8_t, sizeof(pldm_msg_hdr) + PLDM_FILE_ACK_RESP_BYTES>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     // completion code is PLDM_ERROR
@@ -1639,6 +1715,7 @@
 
     uint8_t completionCode = 0x0;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = encode_file_ack_with_meta_data_resp(0, completionCode, response);
@@ -1657,6 +1734,7 @@
     std::array<uint8_t,
                sizeof(pldm_msg_hdr) + PLDM_FILE_ACK_WITH_META_DATA_RESP_BYTES>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     // completion code is PLDM_ERROR
@@ -1681,8 +1759,10 @@
                PLDM_FILE_ACK_WITH_META_DATA_RESP_BYTES + sizeof(pldm_msg_hdr)>
         responseMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
     size_t payload_length = responseMsg.size() - sizeof(pldm_msg_hdr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_file_ack_with_meta_data_resp*>(
         responsePtr->payload);
 
@@ -1713,6 +1793,7 @@
                PLDM_FILE_ACK_WITH_META_DATA_RESP_BYTES + sizeof(pldm_msg_hdr)>
         responseMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     // Payload length is invalid
@@ -1741,6 +1822,7 @@
     uint32_t fileMetaData3Le = htole32(fileMetaData3);
     uint32_t fileMetaData4Le = htole32(fileMetaData4);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_file_ack_with_meta_data_req(
@@ -1802,8 +1884,10 @@
                sizeof(pldm_msg_hdr) + PLDM_FILE_ACK_WITH_META_DATA_REQ_BYTES>
         requestMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
     size_t payload_length = requestMsg.size() - sizeof(pldm_msg_hdr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto request = reinterpret_cast<pldm_file_ack_with_meta_data_req*>(
         requestPtr->payload);
 
@@ -1866,6 +1950,7 @@
                PLDM_FILE_ACK_WITH_META_DATA_REQ_BYTES + sizeof(pldm_msg_hdr)>
         requestMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     // Payload length is invalid
@@ -1883,6 +1968,7 @@
 
     uint8_t completionCode = 0x0;
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = encode_new_file_with_metadata_resp(0, completionCode, response);
@@ -1901,6 +1987,7 @@
     std::array<uint8_t, sizeof(pldm_msg_hdr) +
                             PLDM_NEW_FILE_AVAILABLE_WITH_META_DATA_RESP_BYTES>
         responseMsg{};
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     // completion code is PLDM_ERROR
@@ -1925,8 +2012,10 @@
                             sizeof(pldm_msg_hdr)>
         responseMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
     size_t payload_length = responseMsg.size() - sizeof(pldm_msg_hdr);
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto response = reinterpret_cast<pldm_file_ack_with_meta_data_resp*>(
         responsePtr->payload);
 
@@ -1957,6 +2046,7 @@
                             sizeof(pldm_msg_hdr)>
         responseMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto responsePtr = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     // Payload length is invalid
@@ -1986,6 +2076,7 @@
     uint32_t fileMetaData3Le = htole32(fileMetaData3);
     uint32_t fileMetaData4Le = htole32(fileMetaData4);
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     pldm_msg* request = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     auto rc = encode_new_file_with_metadata_req(
@@ -2049,9 +2140,11 @@
                             sizeof(pldm_msg_hdr)>
         requestMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
     size_t payload_length = requestMsg.size() - sizeof(pldm_msg_hdr);
     auto request =
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
         reinterpret_cast<pldm_new_file_with_metadata_req*>(requestPtr->payload);
 
     // Random value for fileHandle and length
@@ -2116,6 +2209,7 @@
                             sizeof(pldm_msg_hdr)>
         requestMsg{};
 
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     auto requestPtr = reinterpret_cast<pldm_msg*>(requestMsg.data());
 
     // Payload length is invalid
