summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2017-08-10 23:01:07 +0300
committerRobert Mustacchi <rm@joyent.com>2017-11-29 17:17:29 +0000
commitc3f7a870373b38f01b2fb5e6ec30cb456c90ad32 (patch)
tree607a69bc68acabb00acca4a9ab2eb3076a5f987b /usr/src
parentcf07d3da9915c0d22da8f59e991639f819463cef (diff)
downloadillumos-gate-c3f7a870373b38f01b2fb5e6ec30cb456c90ad32.tar.gz
8734 prof: variable 's_inv' set but not used
Reviewed by: Yuri Pankov <yuripv@gmx.com> Reviewed by: C Fraire <cfraire@me.com> Reviewed by: Gary Mills <gary_mills@fastmail.fm> Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/sgs/prof/common/prof.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/usr/src/cmd/sgs/prof/common/prof.c b/usr/src/cmd/sgs/prof/common/prof.c
index c20a3888f6..38a0aa0a9f 100644
--- a/usr/src/cmd/sgs/prof/common/prof.c
+++ b/usr/src/cmd/sgs/prof/common/prof.c
@@ -25,10 +25,7 @@
*/
/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
-
-
-#pragma ident "%Z%%M% %I% %E% SMI"
+/* All Rights Reserved */
/*
* Program profiling report generator.
@@ -351,10 +348,6 @@ main(int argc, char **argv)
long sf; /* Scale for index into pcounts: */
/* i(pc) = ((pc - pc_l) * sf)/bias. */
- /* LINTED: set but not used */
- long s_inv; /* Inverse: i_inv(i) = */
- /* {pc00, pc00+1, ... pc00+s_inv-1}. */
-
unsigned pc_m; /* Range of PCs profiled: pc_m = pc_h - pc_l */
float t, t0;
@@ -605,15 +598,13 @@ pc_l, pc_h, pc_m, pc_m, head.nfns, n_cc, n_pc));
sf >>= 1;
bias >>= 1;
}
- s_inv = pc_m/n_pc; /* Range of PCs mapped into one index. */
/* BEGIN CSTYLED */
OLD_DEBUG(
if (debug_value) {
- Fprint(
- stderr,
- "sf = %d, s_inv = %d bias = %d\n",
- (long)sf, s_inv, bias);
+
+ Fprint(stderr, "sf = %d, s_inv = %d bias = %d\n",
+ (long)sf, pc_m / n_pc, bias);
}
);
/* END CSTYLED */
@@ -1020,8 +1011,8 @@ if (debug_value) {
* option causes certain additional information to be printed.
*/
-OLD_DEBUG(if (debug_value) Fprint(stderr,
-"Time unaccounted for: %.7G\n", t_tot - t0));
+ OLD_DEBUG(if (debug_value) Fprint(stderr,
+ "Time unaccounted for: %.7G\n", t_tot - t0));
if (sort) /* If comparison routine given then use it. */
qsort((char *)slist, (unsigned)n_syms,
@@ -1219,11 +1210,14 @@ eofon(FILE *iop, char *fn)
exit(1);
}
-/* Version of perror() that prints cmdname first. */
+/*
+ * Version of perror() that prints cmdname first.
+ * Print system error message & exit.
+ */
static void
Perror(char *s)
-{ /* Print system error message & exit. */
+{
int err = errno; /* Save current errno in case */
Fprint(stderr, "%s: ", cmdname);