style: fix gcc12 compilation errors

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-04-28 16:50:16 +00:00
committed by Compute-Runtime-Automation
parent 00a1a14652
commit ac01f74924
12 changed files with 24 additions and 11 deletions

View File

@@ -432,6 +432,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendImageCopyFromMemory(ze_i
switch (bytesPerPixel) {
default:
UNRECOVERABLE_IF(true);
break;
case 1u:
builtinKernel = device->getBuiltinFunctionsLib()->getImageFunction(ImageBuiltin::CopyBufferToImage3dBytes);
break;
@@ -548,6 +549,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendImageCopyToMemory(void *
switch (bytesPerPixel) {
default:
UNRECOVERABLE_IF(true);
break;
case 1u:
builtinKernel = device->getBuiltinFunctionsLib()->getImageFunction(ImageBuiltin::CopyImage3dToBufferBytes);
break;
@@ -1700,6 +1702,7 @@ inline uint64_t CommandListCoreFamily<gfxCoreFamily>::getInputBufferSize(NEO::Im
switch (imageType) {
default:
UNRECOVERABLE_IF(true);
break;
case NEO::ImageType::Image1D:
case NEO::ImageType::Image1DArray:
return bytesPerPixel * region->width;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2021 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -69,7 +69,7 @@ static int recvmsg_fd(int socket) {
}
struct cmsghdr *controlHeader = CMSG_FIRSTHDR(&msgHeader);
if (CMSG_DATA(controlHeader) == nullptr) {
if (!CMSG_DATA(controlHeader)) {
return -1;
}
memmove(&fd, CMSG_DATA(controlHeader), sizeof(int));

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2021 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -69,7 +69,7 @@ static int recvmsg_fd(int socket) {
}
struct cmsghdr *controlHeader = CMSG_FIRSTHDR(&msgHeader);
if (CMSG_DATA(controlHeader) == nullptr) {
if (!CMSG_DATA(controlHeader)) {
return -1;
}
memmove(&fd, CMSG_DATA(controlHeader), sizeof(int));

View File

@@ -915,7 +915,9 @@ TEST_F(DeviceTest, givenKernelPropertiesStructureWhenKernelPropertiesCalledThenA
device->getKernelProperties(&kernelProperties);
EXPECT_NE(kernelPropertiesBefore.spirvVersionSupported, kernelProperties.spirvVersionSupported);
EXPECT_NE(kernelPropertiesBefore.nativeKernelSupported.id, kernelProperties.nativeKernelSupported.id);
uint8_t *nativeKernelSupportedIdPointerBefore = kernelPropertiesBefore.nativeKernelSupported.id;
uint8_t *nativeKernelSupportedIdPointerNow = kernelProperties.nativeKernelSupported.id;
EXPECT_NE(nativeKernelSupportedIdPointerBefore, nativeKernelSupportedIdPointerNow);
EXPECT_TRUE(kernelPropertiesBefore.flags & ZE_DEVICE_MODULE_FLAG_FP16);
if (hardwareInfo.capabilityTable.ftrSupportsInteger64BitAtomics) {