sys-utils/lscpu-virt.c: In function ‘lscpu_read_virtualization’:
sys-utils/lscpu-virt.c:574:9: warning: declaration of ‘buf’ shadows a previous local [-Wshadow]
574 | char buf[256];
| ^~~
sys-utils/lscpu-virt.c:506:7: note: shadowed declaration is here
506 | char buf[BUFSIZ];
| ^~~
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
fd = ul_path_fopen(cxt->procfs, "r", "xen/capabilities");
if (fd) {
- char buf[256];
+ char xenbuf[256];
- if (fscanf(fd, "%255s", buf) == 1 &&
- !strcmp(buf, "control_d"))
+ if (fscanf(fd, "%255s", xenbuf) == 1 &&
+ !strcmp(xenbuf, "control_d"))
dom0 = 1;
fclose(fd);
}