mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-29 08:08:37 +00:00
Fix warnings found by Coverity.
Found with: Coverity Prevent(tm) MFC after: 1 month
This commit is contained in:
parent
8e57327bbf
commit
5c15d3c87e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=208858
@ -896,10 +896,12 @@ pmcpl_ct_node_printchild(struct pmcpl_ct_node *ct)
|
||||
/* Call address, line, sample. */
|
||||
addr = ct->pct_image->pi_vaddr + ct->pct_func;
|
||||
line = 0;
|
||||
pmcstat_image_addr2line(ct->pct_image, addr, sourcefile,
|
||||
if (pmcstat_image_addr2line(ct->pct_image, addr, sourcefile,
|
||||
sizeof(sourcefile), &line,
|
||||
funcname, sizeof(funcname));
|
||||
fprintf(args.pa_graphfile, "%p %u", (void *)addr, line);
|
||||
funcname, sizeof(funcname)))
|
||||
fprintf(args.pa_graphfile, "%p %u", (void *)addr, line);
|
||||
else
|
||||
fprintf(args.pa_graphfile, "* *");
|
||||
}
|
||||
else
|
||||
fprintf(args.pa_graphfile, "* *");
|
||||
|
@ -292,7 +292,8 @@ pmcstat_find_targets(const char *spec)
|
||||
0, &nproc)) == NULL)
|
||||
err(EX_OSERR, "ERROR: Cannot get process list: %s",
|
||||
kvm_geterr(pmcstat_kvm));
|
||||
}
|
||||
} else
|
||||
nproc = 0;
|
||||
|
||||
if ((rv = regcomp(®, spec, REG_EXTENDED|REG_NOSUB)) != 0) {
|
||||
regerror(rv, ®, errbuf, sizeof(errbuf));
|
||||
|
@ -1957,6 +1957,7 @@ pmcstat_keypress_log(void)
|
||||
case 'q':
|
||||
wprintw(w, "exiting...");
|
||||
ret = 1;
|
||||
break;
|
||||
default:
|
||||
if (plugins[args.pa_plugin].pl_topkeypress != NULL)
|
||||
if (plugins[args.pa_plugin].pl_topkeypress(c, w))
|
||||
|
Loading…
Reference in New Issue
Block a user