clover: Add constructor for global_argument.

Fix defects reported by Coverity Scan.

member_not_init_in_gen_ctor: The compiler-generated constructor for this class does not initialize buf.
member_not_init_in_gen_ctor: The compiler-generated constructor for this class does not initialize svm.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8623>
This commit is contained in:
Vinson Lee 2021-01-21 14:00:50 -08:00 committed by Marge Bot
parent 001722b3a3
commit f1cffe2394
2 changed files with 5 additions and 0 deletions

View file

@ -453,6 +453,9 @@ void
kernel::scalar_argument::unbind(exec_context &ctx) {
}
kernel::global_argument::global_argument() : buf(nullptr), svm(nullptr) {
}
void
kernel::global_argument::set(size_t size, const void *value) {
if (size != sizeof(cl_mem))

View file

@ -167,6 +167,8 @@ namespace clover {
class global_argument : public argument {
public:
global_argument();
virtual void set(size_t size, const void *value);
virtual void set_svm(const void *value);
virtual void bind(exec_context &ctx,