forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Labels
-Wsometimes-uninitialized[BUG] linux-nextThis is an issue only seen in linux-nextThis is an issue only seen in linux-next[FIXED][LINUX] development cycleThis bug was only present and fixed in a -next or -rc cycleThis bug was only present and fixed in a -next or -rc cycle
Description
mm/zswap.c:1183:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
1183 | if (objcg && !obj_cgroup_may_zswap(objcg))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mm/zswap.c:1327:9: note: uninitialized use occurs here
1327 | return ret;
| ^~~
mm/zswap.c:1183:2: note: remove the 'if' if its condition is always false
1183 | if (objcg && !obj_cgroup_may_zswap(objcg))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1184 | goto reject;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
mm/zswap.c:1158:9: note: initialize the variable 'ret' to silence this warning
1158 | int ret;
| ^
| = 0
1 error generated.
Patch submitted: https://lore.kernel.org/20230601-zswap-cgroup-wsometimes-uninitialized-v1-1-35debdd19293@kernel.org/
Metadata
Metadata
Assignees
Labels
-Wsometimes-uninitialized[BUG] linux-nextThis is an issue only seen in linux-nextThis is an issue only seen in linux-next[FIXED][LINUX] development cycleThis bug was only present and fixed in a -next or -rc cycleThis bug was only present and fixed in a -next or -rc cycle