Skip to content

Commit 3f48d34

Browse files
authored
[OpenMP][runtime] Fix comparison of integer expressions of different signedness (#128204)
This PR fixes warning which occurs if one compiles OpenMP runtime with GCC: ``` warning: comparison of integer expressions of different signedness: 'kmp_intptr_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare] ```
1 parent 5387a77 commit 3f48d34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

openmp/runtime/src/kmp_taskdeps.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ kmp_int32 __kmpc_omp_task_with_deps(ident_t *loc_ref, kmp_int32 gtid,
764764

765765
for (i = 0; i < ndeps; i++) {
766766
ompt_deps[i].variable.ptr = (void *)dep_list[i].base_addr;
767-
if (dep_list[i].base_addr == KMP_SIZE_T_MAX)
767+
if (dep_list[i].base_addr == (kmp_intptr_t)KMP_SIZE_T_MAX)
768768
ompt_deps[i].dependence_type = ompt_dependence_type_out_all_memory;
769769
else if (dep_list[i].flags.in && dep_list[i].flags.out)
770770
ompt_deps[i].dependence_type = ompt_dependence_type_inout;
@@ -781,7 +781,7 @@ kmp_int32 __kmpc_omp_task_with_deps(ident_t *loc_ref, kmp_int32 gtid,
781781
}
782782
for (i = 0; i < ndeps_noalias; i++) {
783783
ompt_deps[ndeps + i].variable.ptr = (void *)noalias_dep_list[i].base_addr;
784-
if (noalias_dep_list[i].base_addr == KMP_SIZE_T_MAX)
784+
if (noalias_dep_list[i].base_addr == (kmp_intptr_t)KMP_SIZE_T_MAX)
785785
ompt_deps[ndeps + i].dependence_type =
786786
ompt_dependence_type_out_all_memory;
787787
else if (noalias_dep_list[i].flags.in && noalias_dep_list[i].flags.out)

0 commit comments

Comments
 (0)