Skip to content
Commit a5020f4f authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Deepak Rawat
Browse files

drm/vmwgfx: Zero initialize handle in vmw_execbuf_process

When building with -Wsometimes-uninitialized, Clang warns:

drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:3964:7: warning: variable
'handle' is used uninitialized whenever '?:' condition is false
[-Wsometimes-uninitialized]

It's not wrong; however, in practice, this is never an issue because
the value of handle isn't used when user_fence_rep is NULL because
vmw_execbuf_copy_fence_user returns immediately when that is the case.
Just zero initialize this variable so that Clang no longer warns.

Link: https://github.com/ClangBuiltLinux/linux/issues/397


Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Signed-off-by: default avatarDeepak Rawat <drawat@vmware.com>
parent 11c45419
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment