Fix some LGTM warnings (#949)

This commit is contained in:
Murat Seker
2020-08-08 12:59:40 +02:00
committed by GitHub
parent 1df0e9ce17
commit 5758b19cbc
7 changed files with 14 additions and 14 deletions

View File

@@ -86,7 +86,7 @@ void XcbGrabber::setupResources()
if(_XcbShmAvailable)
{
_shminfo = xcb_generate_id(_connection);
int id = shmget(IPC_PRIVATE, _width * _height * 4, IPC_CREAT | 0777);
int id = shmget(IPC_PRIVATE, size_t(_width) * size_t(_height) * 4, IPC_CREAT | 0777);
_shmData = static_cast<uint8_t*>(shmat(id, nullptr, 0));
xcb_shm_attach(_connection, _shminfo, id, 0);
}