Re: [PATCH] PCI: rpaphp: Avoid a sometimes-uninitialized warning

2019-06-03 Thread Christophe Leroy
Quoting Nathan Chancellor : When building with -Wsometimes-uninitialized, clang warns: drivers/pci/hotplug/rpaphp_core.c:243:14: warning: variable 'fndit' is used uninitialized whenever 'for' loop exits because its condition is false [-Wsometimes-uninitialized] for (j = 0; j < entries

Re: [PATCH] PCI: rpaphp: Avoid a sometimes-uninitialized warning

2019-06-03 Thread Nick Desaulniers
On Mon, Jun 3, 2019 at 10:44 AM Nathan Chancellor wrote: > Looking at the loop in a vacuum as clang would, fndit could be > uninitialized if entries was ever zero or the if statement was > always true within the loop. Regardless of whether or not this > warning is a problem in practice, "found" va

Re: [PATCH] PCI: rpaphp: Avoid a sometimes-uninitialized warning

2019-06-03 Thread Nathan Chancellor
Hi Nick, On Mon, Jun 03, 2019 at 02:07:50PM -0700, Nick Desaulniers wrote: > On Mon, Jun 3, 2019 at 10:44 AM Nathan Chancellor > wrote: > > Looking at the loop in a vacuum as clang would, fndit could be > > uninitialized if entries was ever zero or the if statement was > > always true within the