On Fri, Nov 16, 2018 at 03:54:24PM +0800, Qu Wenruo wrote: > The only location is the following code: > > int level = path->lowest_level + 1; > BUG_ON(path->lowest_level + 1 >= BTRFS_MAX_LEVEL); > while(level < BTRFS_MAX_LEVEL) { > slot = path->slots[level] + 1; > ... > } > path->slots[level] = slot; > > Again, it's the stupid compiler needs some hint for the fact that > we will always enter the while loop for at least once, thus @slot should > always be initialized.
Harsh words for the compiler, and I say not deserved. The same code pasted to kernel a built with the same version does not report the warning, so it's apparently a missing annotation of BUG_ON in btrfs-progs that does not give the right hint.