From fbb67a73c44890fbeb1d643cb1d772f29c538424 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Mon, 17 Mar 2025 17:45:02 +0100 Subject: libcamera: media_device: Ignore `lockf()` return value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When `_FORTIFY_SOURCE` is enabled, the `lockf()` function might be marked with the `warn_unused_result` attribute, leading to compilation failure. Fix that by explicitly ignoring the return value. Signed-off-by: Barnabás Pőcze Reviewed-by: Jacopo Mondi Reviewed-by: Kieran Bingham --- src/libcamera/media_device.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp index d71dad74..75abd91d 100644 --- a/src/libcamera/media_device.cpp +++ b/src/libcamera/media_device.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -164,7 +165,7 @@ void MediaDevice::unlock() if (!fd_.isValid()) return; - lockf(fd_.get(), F_ULOCK, 0); + std::ignore = lockf(fd_.get(), F_ULOCK, 0); } /** -- cgit v1.2.1