-
Notifications
You must be signed in to change notification settings - Fork 35
unify return values for destroy functions #1356
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
base: main
Are you sure you want to change the base?
Conversation
5d2f404
to
941f998
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls remember to open a draft PR in SYCL repo to update UMF usage there; can be done now or after the merge
@@ -48,7 +48,7 @@ typedef struct umf_memory_pool_ops_t { | |||
/// @brief Finalizes memory pool | |||
/// @param pool pool to finalize | |||
/// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing @return
..?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -43,7 +43,7 @@ typedef struct umf_memory_provider_ops_t { | |||
/// @brief Finalizes memory provider. | |||
/// @param provider provider to finalize | |||
/// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing @return
..?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -48,8 +48,11 @@ void test_disjoint_pool_shared_limits(void) { | |||
|
|||
umfPoolDestroy(pool); | |||
umfMemoryProviderDestroy(provider); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
soo... should we add a return value check in all tests for all destroy calls...?
// I can see you added in some/most tests, but not in all of them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too much work, and almost zero gain to add it everywhere - i added few asserts for all changes function to ensure that return value is correct.
} | ||
|
||
if (!hProvider) { | ||
return UMF_RESULT_SUCCESS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we might be missing a test for that case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
fixes: #1217
Description
Checklist