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>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user