Skip to content

Commit 35b83de

Browse files
authored
Merge pull request #2066 from RossBrunton/ross/wextra
[NFC] Warning squishing
2 parents f31160d + 420d79e commit 35b83de

File tree

12 files changed

+39
-24
lines changed

12 files changed

+39
-24
lines changed

source/adapters/level_zero/context.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ ur_result_t ur_context_handle_t_::getFreeSlotInExistingOrNewPool(
512512
// Create one event ZePool per MaxNumEventsPerPool events
513513
if (*ZePool == nullptr) {
514514
ze_event_pool_counter_based_exp_desc_t counterBasedExt = {
515-
ZE_STRUCTURE_TYPE_COUNTER_BASED_EVENT_POOL_EXP_DESC};
515+
ZE_STRUCTURE_TYPE_COUNTER_BASED_EVENT_POOL_EXP_DESC, nullptr, 0};
516516
ZeStruct<ze_event_pool_desc_t> ZeEventPoolDesc;
517517
ZeEventPoolDesc.count = MaxNumEventsPerPool;
518518
ZeEventPoolDesc.flags = 0;

source/adapters/level_zero/event.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1517,8 +1517,8 @@ ur_result_t _ur_ze_event_list_t::createAndRetainUrZeEventList(
15171517

15181518
std::shared_lock<ur_shared_mutex> Lock(EventList[I]->Mutex);
15191519

1520-
ur_device_handle_t QueueRootDevice;
1521-
ur_device_handle_t CurrentQueueRootDevice;
1520+
ur_device_handle_t QueueRootDevice = nullptr;
1521+
ur_device_handle_t CurrentQueueRootDevice = nullptr;
15221522
if (Queue) {
15231523
QueueRootDevice = Queue->Device;
15241524
CurrentQueueRootDevice = CurQueueDevice;

source/adapters/level_zero/image.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "sampler.hpp"
1717
#include "ur_interface_loader.hpp"
1818
#include "ur_level_zero.hpp"
19+
#include "ze_api.h"
1920

2021
typedef ze_result_t(ZE_APICALL *zeImageGetDeviceOffsetExp_pfn)(
2122
ze_image_handle_t hImage, uint64_t *pDeviceOffset);
@@ -445,7 +446,8 @@ ur_result_t bindlessImagesCreateImpl(ur_context_handle_t hContext,
445446
ze_image_handle_t ZeImage;
446447

447448
ze_memory_allocation_properties_t MemAllocProperties{
448-
ZE_STRUCTURE_TYPE_MEMORY_ALLOCATION_PROPERTIES};
449+
ZE_STRUCTURE_TYPE_MEMORY_ALLOCATION_PROPERTIES, nullptr,
450+
ZE_MEMORY_TYPE_UNKNOWN, 0, 0};
449451
ZE2UR_CALL(zeMemGetAllocProperties,
450452
(hContext->ZeContext, reinterpret_cast<const void *>(hImageMem),
451453
&MemAllocProperties, nullptr));

source/adapters/level_zero/v2/event_provider_normal.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ provider_pool::provider_pool(ur_context_handle_t context,
3232
desc.flags = ZE_EVENT_POOL_FLAG_HOST_VISIBLE;
3333

3434
ze_event_pool_counter_based_exp_desc_t counterBasedExt = {
35-
ZE_STRUCTURE_TYPE_COUNTER_BASED_EVENT_POOL_EXP_DESC, nullptr};
35+
ZE_STRUCTURE_TYPE_COUNTER_BASED_EVENT_POOL_EXP_DESC, nullptr, 0};
3636

3737
if (events == event_type::EVENT_COUNTER) {
3838
counterBasedExt.flags =

source/adapters/level_zero/v2/queue_immediate_in_order.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ ur_queue_immediate_in_order_t::queueGetInfo(ur_queue_info_t propName,
147147
// We can exit early if we have in-order queue.
148148
if (!lastHandler)
149149
return ReturnValue(true);
150+
[[fallthrough]];
150151
}
151152
default:
152153
logger::error(

source/loader/ur_lib.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -560,19 +560,20 @@ ur_result_t urDeviceGetSelected(ur_platform_handle_t hPlatform,
560560
const auto thirdDeviceId = getDeviceId(thirdPart);
561561
deviceList.push_back(DeviceSpec{
562562
DevicePartLevel::SUBSUB, hardwareType, firstDeviceId,
563-
secondDeviceId, thirdDeviceId});
563+
secondDeviceId, thirdDeviceId, nullptr});
564564
} else {
565565
// second dot not found, this is a subdevice
566-
deviceList.push_back(DeviceSpec{DevicePartLevel::SUB,
567-
hardwareType, firstDeviceId,
568-
secondDeviceId});
566+
deviceList.push_back(
567+
DeviceSpec{DevicePartLevel::SUB, hardwareType,
568+
firstDeviceId, secondDeviceId, 0, nullptr});
569569
}
570570
} else {
571571
// first dot not found, this is a root device
572572
const auto hardwareType = getRootHardwareType(filterString);
573573
const auto firstDeviceId = getDeviceId(filterString);
574574
deviceList.push_back(DeviceSpec{DevicePartLevel::ROOT,
575-
hardwareType, firstDeviceId});
575+
hardwareType, firstDeviceId, 0,
576+
0, nullptr});
576577
}
577578
}
578579
}
@@ -587,8 +588,9 @@ ur_result_t urDeviceGetSelected(ur_platform_handle_t hPlatform,
587588
// for example, we pretend that "garbage:0;!cuda:*" was just "!cuda:*"
588589
// so we add an implicit accept-all term (equivalent to prepending "*:*;")
589590
// as we would have done if the user had given us the corrected string
590-
acceptDeviceList.push_back(DeviceSpec{
591-
DevicePartLevel::ROOT, ::UR_DEVICE_TYPE_ALL, DeviceIdTypeALL});
591+
acceptDeviceList.push_back(DeviceSpec{DevicePartLevel::ROOT,
592+
::UR_DEVICE_TYPE_ALL,
593+
DeviceIdTypeALL, 0, 0, nullptr});
592594
}
593595

594596
logger::debug("DEBUG: size of acceptDeviceList = {}",

test/adapters/level_zero/urKernelCreateWithNativeHandle.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ TEST_P(urLevelZeroKernelNativeHandleTest, OwnedHandleRelease) {
2424
auto kernel_name =
2525
uur::KernelsEnvironment::instance->GetEntryPointNames("foo")[0];
2626

27-
ze_module_desc_t moduleDesc = {ZE_STRUCTURE_TYPE_MODULE_DESC};
27+
ze_module_desc_t moduleDesc{};
28+
moduleDesc.stype = ZE_STRUCTURE_TYPE_MODULE_DESC;
2829
moduleDesc.format = ZE_MODULE_FORMAT_IL_SPIRV;
2930
moduleDesc.inputSize = il_binary->size();
3031
moduleDesc.pInputModule =
@@ -36,7 +37,8 @@ TEST_P(urLevelZeroKernelNativeHandleTest, OwnedHandleRelease) {
3637
&module, NULL),
3738
ZE_RESULT_SUCCESS);
3839

39-
ze_kernel_desc_t kernelDesc = {ZE_STRUCTURE_TYPE_KERNEL_DESC};
40+
ze_kernel_desc_t kernelDesc{};
41+
kernelDesc.stype = ZE_STRUCTURE_TYPE_KERNEL_DESC;
4042
kernelDesc.pKernelName = kernel_name.c_str();
4143

4244
ze_kernel_handle_t native_kernel;
@@ -75,7 +77,8 @@ TEST_P(urLevelZeroKernelNativeHandleTest, NullProgram) {
7577
auto kernel_name =
7678
uur::KernelsEnvironment::instance->GetEntryPointNames("foo")[0];
7779

78-
ze_module_desc_t moduleDesc = {ZE_STRUCTURE_TYPE_MODULE_DESC};
80+
ze_module_desc_t moduleDesc{};
81+
moduleDesc.stype = ZE_STRUCTURE_TYPE_MODULE_DESC;
7982
moduleDesc.format = ZE_MODULE_FORMAT_IL_SPIRV;
8083
moduleDesc.inputSize = il_binary->size();
8184
moduleDesc.pInputModule =
@@ -87,7 +90,8 @@ TEST_P(urLevelZeroKernelNativeHandleTest, NullProgram) {
8790
&module, NULL),
8891
ZE_RESULT_SUCCESS);
8992

90-
ze_kernel_desc_t kernelDesc = {ZE_STRUCTURE_TYPE_KERNEL_DESC};
93+
ze_kernel_desc_t kernelDesc{};
94+
kernelDesc.stype = ZE_STRUCTURE_TYPE_KERNEL_DESC;
9195
kernelDesc.pKernelName = kernel_name.c_str();
9296

9397
ze_kernel_handle_t native_kernel;

test/conformance/context/urContextCreate.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ TEST_P(urContextCreateTest, Success) {
1717
}
1818

1919
TEST_P(urContextCreateTest, SuccessWithProperties) {
20-
ur_context_properties_t properties{UR_STRUCTURE_TYPE_CONTEXT_PROPERTIES};
20+
ur_context_properties_t properties{UR_STRUCTURE_TYPE_CONTEXT_PROPERTIES,
21+
nullptr, 0};
2122
uur::raii::Context context = nullptr;
2223
ASSERT_SUCCESS(urContextCreate(1, &device, &properties, context.ptr()));
2324
ASSERT_NE(nullptr, context);

test/conformance/device_code/indexers_usm.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// See LICENSE.TXT
44
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
55

6+
// Offsets are deprecated, but we should still test that they work
7+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
8+
69
#include <sycl/sycl.hpp>
710

811
int main() {

test/conformance/device_code/linker_error.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
// See LICENSE.TXT
44
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
55

6-
#include <CL/sycl.hpp>
6+
#include <sycl/sycl.hpp>
77

88
SYCL_EXTERNAL void this_function_does_not_exist();
99

1010
int main() {
11-
cl::sycl::queue deviceQueue;
12-
cl::sycl::range<1> numOfItems{1};
11+
sycl::queue deviceQueue;
12+
sycl::range<1> numOfItems{1};
1313

1414
try {
15-
deviceQueue.submit([&](cl::sycl::handler &cgh) {
16-
auto kern = [=](cl::sycl::id<1>) {
15+
deviceQueue.submit([&](sycl::handler &cgh) {
16+
auto kern = [=](sycl::id<1>) {
1717
#ifdef __SYCL_DEVICE_ONLY__
1818
this_function_does_not_exist();
1919
#endif

0 commit comments

Comments
 (0)