Commit bae572a
committed
[Darwin] Address gemini-code-assist review feedback on PR project-chip#72211
Two fixes per project-chip#72211 review:
* MTRDeviceAttestationDelegateBridge.mm: switch the attestationUserInfo
construction from an NSDictionary literal to a mutable dictionary with nil
checks. NSDictionary literal syntax @{key:value} raises
NSInvalidArgumentException on a nil value; the @(uint16_t) boxing for the
VID/PID NSNumbers always succeeds today, but defensive construction guards
against future DeviceInfoForAttestation struct changes that could make those
fields nullable.
* MTRError.mm: handle Windows-style backslash path separators in
errorCode.GetFile() basename stripping. CHIP builds run on Windows for some
embedded controller targets; without the fallback to strrchr(file, '\\'),
full Windows build-host paths would land in MTRCHIPErrorSourceFileKey,
defeating the privacy intent.
Both flagged by gemini-code-assist's automated review.1 parent 2b47e05 commit bae572a
2 files changed
Lines changed: 19 additions & 6 deletions
Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
86 | 94 | | |
87 | 95 | | |
88 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
171 | 173 | | |
172 | 174 | | |
173 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
174 | 179 | | |
175 | 180 | | |
176 | 181 | | |
| |||
0 commit comments