Recent commit
7a4a0ac ("MINOR: cli: add a new "show fd" command") introduced
a warning when building at -O2 and above. The compiler doesn't know if a
variable's value might have changed between two if blocks so warns that some
values might be used uninitialized, which is not the case. Let's simply
initialize them to shut the warning.
*/
while (fd < maxfd) {
struct fdtab fdt;
- struct listener *li;
- struct server *sv;
- struct proxy *px;
- uint32_t conn_flags;
+ struct listener *li = NULL;
+ struct server *sv = NULL;
+ struct proxy *px = NULL;
+ uint32_t conn_flags = 0;
fdt = fdtab[fd];