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
Fix some static analyzer warnings #8249
base: master
Are you sure you want to change the base?
Conversation
d35ea12
to
2026f37
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.
LGTM!! just a few minors comments
@@ -11,6 +12,10 @@ Replace Xcode 14.3 binaries with 14.3.1, which has important bug fixes for Swift | |||
### Fixed | |||
* Allow support for implicit boolean queries on Swift's Type Safe Queries API | |||
([#8212](https://github.com/realm/realm-swift/issues/8212)). | |||
* `-[RLMAsymmetricObject createObject:withValue:]` was marked as having a | |||
non-null return value despite always returning `nil` (since v10.29.0). | |||
* Eliminate several clang static analyzer warnings which did not report actual |
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.
Can you tag the issue which reported this?
} | ||
|
||
if constexpr (is_any_v<C, Columns<Dictionary>> && is_any_v<T, Columns<StringData>, Columns<BinaryData>>) { | ||
// Core only implements these for Columns<Mixed> due to Dictionary being Mixed internall |
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.
// Core only implements these for Columns<Mixed> due to Dictionary being Mixed internall | |
// Core only implements these for Columns<Mixed> due to Dictionary being Mixed internal |
do_add_diacritic_sensitive_string_constraint(operatorType, predicateOptions, std::forward<C>(column), value); | ||
} | ||
|
||
if constexpr (is_any_v<C, Columns<Dictionary>> && is_any_v<T, Columns<StringData>, Columns<BinaryData>>) { |
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.
Can we just check if T is mixed and throw otherwise
@@ -1603,6 +1603,10 @@ - (void)testConvertToEmbeddedAddingMoreLinks { | |||
XCTAssertNotNil(oldObject); | |||
XCTAssertNotNil(newObject); | |||
RLMObject *childObject = newObject[@"object"]; | |||
XCTAssertNotNil(childObject); | |||
if (childObject == nil) { |
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.
If the above assertion fails, is this even run?
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.
Yes. The rest of the test continues running even if an XCTest assertion fails.
2026f37
to
eb472ea
Compare
eb472ea
to
fef2fec
Compare
Was just about to start making similar changes when I saw this PR! Thanks for doing this! |
No description provided.