refactor: resolve Sonar cpp:S5008 findings (#5909)

This commit is contained in:
Dave Lane authored and GitHub committed 2026-10-13 10:09:32 -04:00
1 parent e2a56b3d17
commit 1925909fbc
41 files changed
+722 -149

No files matched your search

+6 -4
View File
@@ -684,10 +684,12 @@ namespace input {
}
/**
* @brief Write a debug log representation of the input packet.
* @brief Decode the input header and log the matching packet representation.
*
* @param payload Header at the start of the input packet.
*/
void print(void *payload) {
auto header = (PNV_INPUT_HEADER) payload;
void print(PNV_INPUT_HEADER payload) {
auto header = payload;
switch (util::endian::little(header->magic)) {
case MOUSE_MOVE_REL_MAGIC_GEN5:
@@ -2152,7 +2154,7 @@ namespace input {
}
// Print the final input packet
input::print((void *) payload);
input::print(payload);
#ifdef SUNSHINE_TESTS
if (const auto &hook = input_packet_hook(); hook) {