summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBarnabás Pőcze <barnabas.pocze@ideasonboard.com>2025-03-17 17:45:02 +0100
committerBarnabás Pőcze <barnabas.pocze@ideasonboard.com>2025-03-21 16:26:35 +0100
commitfbb67a73c44890fbeb1d643cb1d772f29c538424 (patch)
tree4c8b1452c7ce1c22fdbe37b85579a7aee6670ff0 /src
parentbb7f702b489009d840c546864de67df5ddd2bc5e (diff)
libcamera: media_device: Ignore `lockf()` return value
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 <barnabas.pocze@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/media_device.cpp3
1 files changed, 2 insertions, 1 deletions
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 <string>
#include <string.h>
#include <sys/ioctl.h>
+#include <tuple>
#include <unistd.h>
#include <vector>
@@ -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);
}
/**