-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang-tidy] Fix a clang-analyzer-nullability.NullablePassedToNonnull…
… occurence in src/platform/Darwin/KeyValueStoreManagerImpl.mm (#15586)
- Loading branch information
1 parent
630c6c5
commit ad6d418
Showing
1 changed file
with
10 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ad6d418
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.
Hi @vivien-apple ,
I'm building the HEAD of master for the iOS CHIP Tool and I notice that when I tap the "QRCode scanner" on the first screen, the app crashes.
I've managed to pinpoint the crash to these changes / this commit.
If I use the HEAD of master, but keep src/platform/Darwin/KeyValueStoreManagerImpl.mm as it was before the changes above, I can see that it no longer crashes.
I think just reverting this line
if ([filepath hasPrefix:@"/"]) {
toif (fileName[0] != '/') {
should fix it.From what I can see, your change makes it hit the else block of code which causes the crash. If it hits the if block then its OK.
The app crashes at this point to l.234 of CHIPDeviceController.mm of
errorCode = factory.Init(params);
Hope this helps.
Thanks
ad6d418
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.
@danh-geo
I did a stupid mistake while updating this code. I assume replacing
if ([filepath hasPrefix:@"/"])
byif (![filepath hasPrefix:@"/"])
will work. I have reverted the if/else case :(