summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2005-05-03 08:09:53 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2005-05-03 08:09:53 +0000
commit39fdadcf4c611694ff7e318c190b21be7431b07b (patch)
tree617271eb3f97d136f46094450698d0ba21b1416e
parent8b4bb5e999c1984d85b7f4887ebef8ac2ca440aa (diff)
Fix some sign issues and make kernel profiling useful on amd64.
millert@ miod@ ok
-rw-r--r--usr.bin/gprof/gprof.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/gprof/gprof.c b/usr.bin/gprof/gprof.c
index 23765929c1f..1aefa537dc5 100644
--- a/usr.bin/gprof/gprof.c
+++ b/usr.bin/gprof/gprof.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gprof.c,v 1.14 2004/07/20 08:46:23 art Exp $ */
+/* $OpenBSD: gprof.c,v 1.15 2005/05/03 08:09:52 art Exp $ */
/* $NetBSD: gprof.c,v 1.8 1995/04/19 07:15:59 cgd Exp $ */
/*
@@ -40,7 +40,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)gprof.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: gprof.c,v 1.14 2004/07/20 08:46:23 art Exp $";
+static char rcsid[] = "$OpenBSD: gprof.c,v 1.15 2005/05/03 08:09:52 art Exp $";
#endif
#endif /* not lint */
@@ -435,7 +435,7 @@ asgnsamples(void)
UNIT ccnt;
double time;
unsigned long pcl, pch;
- int i;
+ unsigned long i;
unsigned long overlap;
unsigned long svalue0, svalue1;
@@ -447,8 +447,8 @@ asgnsamples(void)
ccnt = samples[i];
if (ccnt == 0)
continue;
- pcl = lowpc + scale * i;
- pch = lowpc + scale * (i + 1);
+ pcl = lowpc + (unsigned long)(scale * i);
+ pch = lowpc + (unsigned long)(scale * (i + 1));
time = ccnt;
# ifdef DEBUG
if ( debug & SAMPLEDEBUG ) {