Fix warnings found by Coverity.
Found with: Coverity Prevent(tm) MFC after: 1 month
This commit is contained in:
parent
28122090a3
commit
0ecf60c0b7
@ -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