Skip to content

Commit 7e81e54

Browse files
[build flags] 2nd prep to enable more warnings in compile flags (#21996) (#22273)
Second step of preparing the code to enable more warnings during compilation: ``` -Wambiguous-member-template -Wchar-subscripts -Wgnu-alignof-expression -Wgnu-variable-sized-type-not-at-end -Wignored-optimization-argument -Winvalid-source-encoding -Wmismatched-tags -Wmissing-braces -Wpointer-sign -Wreserved-user-defined-literal -Wreturn-type-c-linkage -Wself-assign-overloaded -Wsign-compare -Wsigned-unsigned-wchar -Wstrict-overflow -Wtrigraphs -Wunknown-pragmas -Wunknown-warning-option -Wunused-command-line-argument -Wunused-local-typedef -Wuser-defined-warnings ``` This change contains a few more code changes to avoid the warnings mentioned above, which were missed in #22252. It does not turn on the warnings yet. Signed-off-by: Stefan Schuermans <[email protected]>
1 parent 2b30f25 commit 7e81e54

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

runtime/src/iree/hal/drivers/hip/hip_driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ static bool iree_hal_hip_driver_is_path_uuid(iree_string_view_t device_path) {
500500
}
501501

502502
static bool iree_hal_hip_driver_is_path_index(iree_string_view_t device_path) {
503-
uint32_t unused_device_index = 0;
503+
int32_t unused_device_index = 0;
504504
return iree_string_view_atoi_int32(device_path, &unused_device_index);
505505
}
506506

runtime/src/iree/hal/drivers/hip/native_executable.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,23 +63,23 @@ static iree_status_t iree_hal_hip_query_limits(
6363

6464
IREE_HIP_RETURN_IF_ERROR(
6565
symbols,
66-
hipDeviceGetAttribute(&out_limits->max_block_dims[0],
66+
hipDeviceGetAttribute((int32_t*)&out_limits->max_block_dims[0],
6767
hipDeviceAttributeMaxBlockDimX, device),
6868
"hipDeviceGetAttribute");
6969
IREE_HIP_RETURN_IF_ERROR(
7070
symbols,
71-
hipDeviceGetAttribute(&out_limits->max_block_dims[1],
71+
hipDeviceGetAttribute((int32_t*)&out_limits->max_block_dims[1],
7272
hipDeviceAttributeMaxBlockDimY, device),
7373
"hipDeviceGetAttribute");
7474
IREE_HIP_RETURN_IF_ERROR(
7575
symbols,
76-
hipDeviceGetAttribute(&out_limits->max_block_dims[2],
76+
hipDeviceGetAttribute((int32_t*)&out_limits->max_block_dims[2],
7777
hipDeviceAttributeMaxBlockDimZ, device),
7878
"hipDeviceGetAttribute");
7979

8080
IREE_HIP_RETURN_IF_ERROR(
8181
symbols,
82-
hipDeviceGetAttribute(&out_limits->max_block_shared_memory_size,
82+
hipDeviceGetAttribute((int32_t*)&out_limits->max_block_shared_memory_size,
8383
hipDeviceAttributeMaxSharedMemoryPerBlock, device),
8484
"hipDeviceGetAttribute");
8585

0 commit comments

Comments
 (0)