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/nvme/host/ioctl.c #1630

Closed
nathanchance opened this issue May 6, 2022 · 1 comment
Closed

-Wsometimes-uninitialized in drivers/nvme/host/ioctl.c #1630

nathanchance opened this issue May 6, 2022 · 1 comment
Assignees
Labels
-Wsometimes-uninitialized [BUG] linux-next This is an issue only seen in linux-next [FIXED][LINUX] development cycle This bug was only present and fixed in a -next or -rc cycle

Comments

@nathanchance
Copy link
Member

drivers/nvme/host/ioctl.c:674:6: error: variable 'ret' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
        if (ns)
            ^~
drivers/nvme/host/ioctl.c:677:9: note: uninitialized use occurs here
        return ret;
               ^~~
drivers/nvme/host/ioctl.c:674:2: note: remove the 'if' if its condition is always true
        if (ns)
        ^~~~~~~
drivers/nvme/host/ioctl.c:672:9: note: initialize the variable 'ret' to silence this warning
        int ret;
               ^
                = 0
1 error generated.

Patch submitted: https://lore.kernel.org/20220506150357.2443040-1-nathan@kernel.org/

@nathanchance nathanchance added [PATCH] Submitted A patch has been submitted for review [BUG] linux-next This is an issue only seen in linux-next -Wsometimes-uninitialized labels May 6, 2022
@nathanchance nathanchance self-assigned this May 6, 2022
@nathanchance
Copy link
Member Author

The fixup was squashed in and it is available in next-20220509.

@nathanchance nathanchance added [FIXED][LINUX] development cycle This bug was only present and fixed in a -next or -rc cycle and removed [PATCH] Submitted A patch has been submitted for review labels May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Wsometimes-uninitialized [BUG] linux-next This is an issue only seen in linux-next [FIXED][LINUX] development cycle This bug was only present and fixed in a -next or -rc cycle
Projects
None yet
Development

No branches or pull requests

1 participant