You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR fixes Coverity hits regarding uninitialized class fields in the
runtime.
I'd like to bring attention to `sycl_mem_obj_t.hpp` however: There, I
have initialized `MSizeInBytes` of the `SYCLMemObjT` class to 0: This
should not cause any problems (at least not more), as currently all
subclasses of `SYCLMemObjT` that actually use the `MSizeInBytes` have it
defined (`buffer_impl`, `image_impl`) when their respective constructors
are called. However, this does mean programmers must remember to
initialize `MSizeInBytes` when using `image_impl`.
To avoid this, I could rewrite some of the constructors in e.g.
`image_impl` and `SYCLMemObjT`, but I'd like to not overcomplicate the
problem here. So I was hoping for some other opinions: Is initializing
as 0 sufficient, or should I go ahead and make the changes to the
constructors anyway to be safe? Thanks in advance!
0 commit comments