Skip to content
Commit 7e74e235 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

gcc-9: don't warn about uninitialized btrfs extent_type variable



The 'extent_type' variable does seem to be reliably initialized, but
it's _very_ non-obvious, since there's a "goto next" case that jumps
over the normal initialization.  That will then always trigger the
"start >= extent_end" test, which will end up never falling through to
the use of that variable.

But the code is certainly not obvious, and the compiler warning looks
reasonable.  Make 'extent_type' an int, and initialize it to an invalid
negative value, which seems to be the common pattern in other places.

Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 459e3a21
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment