Skip to content

Commit 96c624a

Browse files
helpers: media_device: ignore lockf return value
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 <[email protected]>
1 parent dbbcf4f commit 96c624a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/helpers/media_device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,6 @@ std::map<std::string, DeviceFd>::iterator MediaDevice::unlock(const std::string
248248
if (it == lock_map_.end())
249249
return lock_map_.end();
250250

251-
lockf(it->second.Get(), F_ULOCK, 0);
251+
std::ignore = lockf(it->second.Get(), F_ULOCK, 0);
252252
return lock_map_.erase(it);
253253
}

0 commit comments

Comments
 (0)