From b79ce32e4e345a25ed229635120eb5202f22236f Mon Sep 17 00:00:00 2001 From: Matt Macy Date: Mon, 4 Jun 2018 06:30:35 +0000 Subject: [PATCH] pmc filter: avoid spurious gcc uninitialized warning --- usr.sbin/pmc/cmd_pmc_filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/pmc/cmd_pmc_filter.c b/usr.sbin/pmc/cmd_pmc_filter.c index 6d0bc36f1401..c4dbe2a2fe7d 100644 --- a/usr.sbin/pmc/cmd_pmc_filter.c +++ b/usr.sbin/pmc/cmd_pmc_filter.c @@ -145,7 +145,7 @@ pmc_filter_handler(uint32_t *lwplist, int lwpcount, uint32_t *pidlist, int pidco if ((ps = pmclog_open(infd)) == NULL) errx(EX_OSERR, "ERROR: Cannot allocate pmclog parse state: %s\n", strerror(errno)); - pmccount = 0; + eventcount = pmccount = 0; while (pmclog_read(ps, &ev) == 0) { if (ev.pl_type == PMCLOG_TYPE_INITIALIZE) memcpy(cpuid, ev.pl_u.pl_i.pl_cpuid, PMC_CPUID_LEN);