From 9e8806022a41df86f80edee978b8c34ad9d19555 Mon Sep 17 00:00:00 2001 From: Manvi Bajaj Date: Mon, 17 Feb 2025 15:04:43 +0530 Subject: [PATCH] Fix static analysis issues for VInput Manager Below issues will be solved with this change. +-------------+ |Useless Call | +-------------+ Tracked-On: OAM-128632 Signed-off-by: Manvi Bajaj --- sendKey.cpp | 6 +++--- vInputDevice.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sendKey.cpp b/sendKey.cpp index dc1a314..8339c12 100644 --- a/sendKey.cpp +++ b/sendKey.cpp @@ -63,7 +63,7 @@ static void sendPowerEvent(int32_t ctrl) exit(0); buf.bCtrl = static_cast(ctrl); - msgsnd(mqId, &buf, sizeof(buf) - sizeof(long), 0); + (void)msgsnd(mqId, &buf, sizeof(buf) - sizeof(long), 0); } static void sendVolumeEvent(int32_t ctrl) @@ -77,11 +77,11 @@ static void sendVolumeEvent(int32_t ctrl) switch (ctrl) { case UP: buf.bCtrl = UP; - msgsnd(mqId, &buf, sizeof(buf) - sizeof(long), 0); + (void)msgsnd(mqId, &buf, sizeof(buf) - sizeof(long), 0); break; case DOWN: buf.bCtrl = DOWN; - msgsnd(mqId, &buf, sizeof(buf) - sizeof(long), 0); + (void)msgsnd(mqId, &buf, sizeof(buf) - sizeof(long), 0); break; default: cout << "Invalid Volume control option" << endl; diff --git a/vInputDevice.cpp b/vInputDevice.cpp index 3059b74..46e23e1 100644 --- a/vInputDevice.cpp +++ b/vInputDevice.cpp @@ -281,7 +281,7 @@ static void sendKeyThread(vInputDevice *vDev) } while (true) { - msgrcv(mqId, &data, sizeof(struct mQData) - sizeof(long), 1, 0); + (void)msgrcv(mqId, &data, sizeof(struct mQData) - sizeof(long), 1, 0); if (vD->type == VOLUME) { switch (data.bCtrl) { case UP: