1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
From f2bbf7e000d3f11cac235b8ea1291722080a016c Mon Sep 17 00:00:00 2001
From: Gyorgy Sarvari <skandigraun@gmail.com>
Date: Tue, 16 Sep 2025 17:12:42 +0200
Subject: [PATCH] helpers: media_device: ignore lockf return value
Forwarded: https://github.com/raspberrypi/libpisp/pull/53
Origin: upstream, https://github.com/raspberrypi/libpisp/commit/f2bbf7e
Bug-Debian: https://bugs.debian.org/1115167
When using gcc (with ~-Werror=unused-result), compilation fails,
because the return value of lockf is ignored at one place.
To avoid this error, assign the return value to std::ignore.
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
---
src/helpers/media_device.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/helpers/media_device.cpp b/src/helpers/media_device.cpp
index 0dd64d6..121ce79 100644
--- a/src/helpers/media_device.cpp
+++ b/src/helpers/media_device.cpp
@@ -248,6 +248,6 @@ std::map<std::string, DeviceFd>::iterator MediaDevice::unlock(const std::string
if (it == lock_map_.end())
return lock_map_.end();
- lockf(it->second.Get(), F_ULOCK, 0);
+ std::ignore = lockf(it->second.Get(), F_ULOCK, 0);
return lock_map_.erase(it);
}
|