From: Nathan Moinvaziri Date: Fri, 20 Nov 2020 23:14:06 +0000 (-0800) Subject: Fixed MSAN errnum use-of-uninitialized value warning. gzerror is not guaranteed to... X-Git-Tag: v3.8.0~102^2 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=59d840bf039dbb4b78e83964da0b5127b2d8f05b;p=pciutils.git Fixed MSAN errnum use-of-uninitialized value warning. gzerror is not guaranteed to set errnum so we initialized it to 0. --- diff --git a/lib/names-parse.c b/lib/names-parse.c index f3b7da9..c86f8af 100644 --- a/lib/names-parse.c +++ b/lib/names-parse.c @@ -42,7 +42,7 @@ static pci_file pci_open(struct pci_access *a) #define pci_close(f) gzclose(f) #define PCI_ERROR(f, err) \ if (!err) { \ - int errnum; \ + int errnum = 0; \ gzerror(f, &errnum); \ if (errnum >= 0) err = NULL; \ else if (errnum == Z_ERRNO) err = "I/O error"; \