Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-Wsometimes-uninitialized in drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c #397

Closed
nathanchance opened this issue Feb 26, 2019 · 3 comments
Closed
Assignees
Labels
-Wsometimes-uninitialized [BUG] linux A bug that should be fixed in the mainline kernel. [FIXED][LINUX] 5.2 This bug was fixed in Linux 5.2

Comments

@nathanchance
Copy link
Member

Meta: #381

drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:3964:7: error: variable 'handle' is used uninitialized whenever '?:' condition is false [-Werror,-Wsometimes-uninitialized]
@nathanchance nathanchance added good first issue Good for newcomers [BUG] linux A bug that should be fixed in the mainline kernel. low priority This bug is not critical and not a priority -Wsometimes-uninitialized labels Feb 26, 2019
@nathanchance
Copy link
Member Author

@nathanchance nathanchance added [PATCH] Submitted A patch has been submitted for review and removed good first issue Good for newcomers low priority This bug is not critical and not a priority labels Mar 7, 2019
@nathanchance nathanchance self-assigned this Mar 7, 2019
@nathanchance
Copy link
Member Author

Patch accepted and is in -next now: https://git.kernel.org/next/linux-next/c/a5020f4f537ff1a0b73ea4eb78be185c34b261ae

@nathanchance nathanchance added [PATCH] Accepted A submitted patch has been accepted upstream and removed [PATCH] Submitted A patch has been submitted for review labels Apr 24, 2019
@nathanchance
Copy link
Member Author

@nathanchance nathanchance added [FIXED][LINUX] 5.2 This bug was fixed in Linux 5.2 and removed [PATCH] Accepted A submitted patch has been accepted upstream labels May 9, 2019
evadot pushed a commit to freebsd/drm-kmod that referenced this issue May 10, 2020
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: ClangBuiltLinux/linux#397
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Deepak Rawat <drawat@vmware.com>
evadot pushed a commit to freebsd/drm-kmod that referenced this issue May 11, 2020
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: ClangBuiltLinux/linux#397
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Deepak Rawat <drawat@vmware.com>
evadot pushed a commit to freebsd/drm-kmod that referenced this issue May 13, 2020
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: ClangBuiltLinux/linux#397
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Deepak Rawat <drawat@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Wsometimes-uninitialized [BUG] linux A bug that should be fixed in the mainline kernel. [FIXED][LINUX] 5.2 This bug was fixed in Linux 5.2
Projects
None yet
Development

No branches or pull requests

1 participant