Commit 4e13d23
[SYCL][NFCI] Address static analyzer concerns (#16296)
Two changes were made:
Special `padding` field in accessors is now zero-initialized. We
construct a `host_accessor` object in our stream implementation and
static analyzer complained that some of the accessor's fields were
uninitialized. It is not like we even reference `padding` field from
anywhere, but the code change seems small, so I decided to add the
initializer.
Fixed a condition to prevent access to an array of `N` elements at index
`N`, which is outside of the array because they are 0-indexed.
---------
Co-authored-by: Marcos Maronas <[email protected]>1 parent f26c0b8 commit 4e13d23
2 files changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
807 | 807 | | |
808 | 808 | | |
809 | 809 | | |
810 | | - | |
| 810 | + | |
811 | 811 | | |
812 | 812 | | |
813 | 813 | | |
| |||
2192 | 2192 | | |
2193 | 2193 | | |
2194 | 2194 | | |
2195 | | - | |
| 2195 | + | |
2196 | 2196 | | |
2197 | 2197 | | |
2198 | 2198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
| 109 | + | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
0 commit comments