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:
parent
bb7f702b48
commit
fbb67a73c4
1 changed files with 2 additions and 1 deletions
|
@ -13,6 +13,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
#include <tuple>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
@ -164,7 +165,7 @@ void MediaDevice::unlock()
|
||||||
if (!fd_.isValid())
|
if (!fd_.isValid())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
lockf(fd_.get(), F_ULOCK, 0);
|
std::ignore = lockf(fd_.get(), F_ULOCK, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue