Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHM/POSIX: code beautify #5637

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/ucs/sys/stubs.c
Original file line number Diff line number Diff line change
@@ -26,6 +26,11 @@ int64_t ucs_empty_function_return_zero_int64()
return 0;
}

int ucs_empty_function_return_zero_int()
{
return 0;
}

unsigned ucs_empty_function_return_one()
{
return 1;
1 change: 1 addition & 0 deletions src/ucs/sys/stubs.h
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ void ucs_empty_function();
unsigned ucs_empty_function_return_zero();
unsigned ucs_empty_function_return_one();
int64_t ucs_empty_function_return_zero_int64();
int ucs_empty_function_return_zero_int();
ucs_status_t ucs_empty_function_return_success();
ucs_status_t ucs_empty_function_return_unsupported();
ucs_status_t ucs_empty_function_return_inprogress();
13 changes: 6 additions & 7 deletions src/uct/sm/mm/posix/mm_posix.c
Original file line number Diff line number Diff line change
@@ -655,15 +655,14 @@ static uct_mm_md_mapper_ops_t uct_posix_md_ops = {
.query = uct_posix_md_query,
.mem_alloc = uct_posix_mem_alloc,
.mem_free = uct_posix_mem_free,
.mem_advise = (uct_md_mem_advise_func_t)ucs_empty_function_return_unsupported,
.mem_reg = (uct_md_mem_reg_func_t)ucs_empty_function_return_unsupported,
.mem_dereg = (uct_md_mem_dereg_func_t)ucs_empty_function_return_unsupported,
.mem_advise = ucs_empty_function_return_unsupported,
.mem_reg = ucs_empty_function_return_unsupported,
.mem_dereg = ucs_empty_function_return_unsupported,
.mkey_pack = uct_posix_md_mkey_pack,
.is_sockaddr_accessible = (uct_md_is_sockaddr_accessible_func_t)ucs_empty_function_return_zero,
.detect_memory_type = (uct_md_detect_memory_type_func_t)ucs_empty_function_return_unsupported
.is_sockaddr_accessible = ucs_empty_function_return_zero_int,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can't use ucs_empty_function_return_zero here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is_sockaddr_accessible is signed int (...), but ucs_empty_function_return_zero returns unsigned integer and compiler prompts warning

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

.detect_memory_type = ucs_empty_function_return_unsupported
},
.query = (uct_mm_mapper_query_func_t)
ucs_empty_function_return_success,
.query = ucs_empty_function_return_success,
.iface_addr_length = uct_posix_iface_addr_length,
.iface_addr_pack = uct_posix_iface_addr_pack,
.mem_attach = uct_posix_mem_attach,