clover: Add constructor for image_rd_argument.

Fix defect reported by Coverity Scan.

Uninitialized pointer field (UNINIT_CTOR)
member_not_init_in_gen_ctor: The compiler-generated constructor for this class does not initialize st.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13500>
This commit is contained in:
Vinson Lee
2021-10-22 19:04:21 -07:00
committed by Marge Bot
parent e8f18385e0
commit 20620af1e4
2 changed files with 5 additions and 0 deletions
@@ -584,6 +584,9 @@ kernel::constant_argument::unbind(exec_context &ctx) {
buf->resource_in(*ctx.q).unbind_surface(*ctx.q, st);
}
kernel::image_rd_argument::image_rd_argument() : st(nullptr) {
}
void
kernel::image_rd_argument::set(size_t size, const void *value) {
if (!value)
@@ -218,6 +218,8 @@ namespace clover {
class image_rd_argument : public image_argument {
public:
image_rd_argument();
virtual void set(size_t size, const void *value);
virtual void bind(exec_context &ctx,
const binary::argument &barg);