summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/hexdump/odsyntax.c6
-rw-r--r--usr.bin/last/last.c14
-rw-r--r--usr.bin/lastcomm/lastcomm.c6
-rw-r--r--usr.bin/learn/src/learn.c4
-rw-r--r--usr.bin/modstat/modstat.c12
-rw-r--r--usr.bin/more/more.c4
-rw-r--r--usr.bin/netstat/if.c19
-rw-r--r--usr.bin/oldrdist/docmd.c12
-rw-r--r--usr.bin/oldrdist/expand.c6
-rw-r--r--usr.bin/oldrdist/main.c6
-rw-r--r--usr.bin/pctr/pctr.c4
-rw-r--r--usr.bin/size/size.c8
-rw-r--r--usr.bin/strip/strip.c11
13 files changed, 59 insertions, 53 deletions
diff --git a/usr.bin/hexdump/odsyntax.c b/usr.bin/hexdump/odsyntax.c
index 4cc87a4ed83..8bd665ab707 100644
--- a/usr.bin/hexdump/odsyntax.c
+++ b/usr.bin/hexdump/odsyntax.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: odsyntax.c,v 1.4 2001/07/12 05:17:10 deraadt Exp $ */
+/* $OpenBSD: odsyntax.c,v 1.5 2001/07/18 17:17:39 pvalchev Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -35,7 +35,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)odsyntax.c 5.4 (Berkeley) 3/8/91";*/
-static char rcsid[] = "$OpenBSD: odsyntax.c,v 1.4 2001/07/12 05:17:10 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: odsyntax.c,v 1.5 2001/07/18 17:17:39 pvalchev Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -53,7 +53,7 @@ oldsyntax(argc, argvp)
extern enum _vflag vflag;
extern FS *fshead;
extern char *optarg;
- extern int length, optind;
+ extern int optind;
int ch;
char **argv;
static void odprecede();
diff --git a/usr.bin/last/last.c b/usr.bin/last/last.c
index 383af2529b6..ff600aef89d 100644
--- a/usr.bin/last/last.c
+++ b/usr.bin/last/last.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: last.c,v 1.15 2001/07/12 05:17:13 deraadt Exp $ */
+/* $OpenBSD: last.c,v 1.16 2001/07/18 17:17:39 pvalchev Exp $ */
/* $NetBSD: last.c,v 1.6 1994/12/24 16:49:02 cgd Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)last.c 8.2 (Berkeley) 4/2/94";
#endif
-static char rcsid[] = "$OpenBSD: last.c,v 1.15 2001/07/12 05:17:13 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: last.c,v 1.16 2001/07/18 17:17:39 pvalchev Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -293,7 +293,7 @@ wtmp()
bp->ut_name, UT_LINESIZE,
UT_LINESIZE, bp->ut_line,
HOST_WIDTH, UT_HOSTSIZE,
- bp->ut_host, bp->ut_time);
+ bp->ut_host, (long)bp->ut_time);
} else {
ct = ctime(&bp->ut_time);
printf("%-*.*s %-*.*s %-*.*s %10.10s %*.*s \n",
@@ -321,7 +321,7 @@ wtmp()
NAME_WIDTH, UT_NAMESIZE, bp->ut_name,
UT_LINESIZE, UT_LINESIZE, bp->ut_line,
HOST_WIDTH, UT_HOSTSIZE, bp->ut_host,
- bp->ut_time);
+ (long)bp->ut_time);
} else {
ct = ctime(&bp->ut_time);
printf("%-*.*s %-*.*s %-*.*s %10.10s %*.*s \n",
@@ -360,7 +360,7 @@ wtmp()
NAME_WIDTH, UT_NAMESIZE, bp->ut_name,
UT_LINESIZE, UT_LINESIZE, bp->ut_line,
HOST_WIDTH, UT_HOSTSIZE, bp->ut_host,
- bp->ut_time);
+ (long)bp->ut_time);
} else {
ct = ctime(&bp->ut_time);
printf("%-*.*s %-*.*s %-*.*s %10.10s %*.*s ",
@@ -378,7 +378,7 @@ wtmp()
} else {
if (seconds)
printf("- %ld",
- T->logout);
+ (long)T->logout);
else
printf("- %*.*s",
timesize, timesize,
@@ -386,7 +386,7 @@ wtmp()
}
delta = T->logout - bp->ut_time;
if (seconds)
- printf(" (%ld)\n", delta);
+ printf(" (%ld)\n", (long)delta);
else {
if (delta < SECSPERDAY)
printf(" (%*.*s)\n",
diff --git a/usr.bin/lastcomm/lastcomm.c b/usr.bin/lastcomm/lastcomm.c
index 48c592a1f45..ffc747712b9 100644
--- a/usr.bin/lastcomm/lastcomm.c
+++ b/usr.bin/lastcomm/lastcomm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lastcomm.c,v 1.7 2001/07/12 05:17:15 deraadt Exp $ */
+/* $OpenBSD: lastcomm.c,v 1.8 2001/07/18 17:17:39 pvalchev Exp $ */
/* $NetBSD: lastcomm.c,v 1.9 1995/10/22 01:43:42 ghudson Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)lastcomm.c 8.2 (Berkeley) 4/29/95";
#endif
-static char rcsid[] = "$OpenBSD: lastcomm.c,v 1.7 2001/07/12 05:17:15 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: lastcomm.c,v 1.8 2001/07/18 17:17:39 pvalchev Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -144,7 +144,7 @@ main(argc, argv)
UT_LINESIZE, UT_LINESIZE, getdev(ab.ac_tty),
t / (double)AHZ, ctime(&ab.ac_btime));
delta = expand(ab.ac_etime) / (double)AHZ;
- printf(" (%1.0lf:%02.0f:%05.2f)\n",
+ printf(" (%1.0f:%02.0f:%05.2f)\n",
delta / SECSPERHOUR,
fmod(delta, SECSPERHOUR) / SECSPERMIN,
fmod(delta, SECSPERMIN));
diff --git a/usr.bin/learn/src/learn.c b/usr.bin/learn/src/learn.c
index df4bc3eb907..bc1b1e8d2bd 100644
--- a/usr.bin/learn/src/learn.c
+++ b/usr.bin/learn/src/learn.c
@@ -2,7 +2,7 @@
* learn, from V7 UNIX: one of the earliest Computer Based Training (CBT)
* programs still in existence.
*
- * $OpenBSD: learn.c,v 1.5 2001/07/09 07:04:48 deraadt Exp $
+ * $OpenBSD: learn.c,v 1.6 2001/07/18 17:17:39 pvalchev Exp $
*/
/****************************************************************
@@ -938,8 +938,10 @@ start(char *lesson)
int inode;
char name[14];
};
+#if 0
struct direct dv[ND], *dm, *dp;
int f, c, n;
+#endif
char where [1024];
#if 0
diff --git a/usr.bin/modstat/modstat.c b/usr.bin/modstat/modstat.c
index 884e9282dc7..9fecdee5820 100644
--- a/usr.bin/modstat/modstat.c
+++ b/usr.bin/modstat/modstat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: modstat.c,v 1.12 1999/08/17 09:13:15 millert Exp $ */
+/* $OpenBSD: modstat.c,v 1.13 2001/07/18 17:17:39 pvalchev Exp $ */
/*
* Copyright (c) 1993 Terrence R. Lambert.
@@ -100,14 +100,14 @@ dostat(devfd, modnum, modname)
/*
* Decode this stat buffer...
*/
- printf("%-7s %3d %3d %08x %04x %8x %3d %s\n",
+ printf("%-7s %3d %3ld %08lx %04lx %8lx %3ld %s\n",
type_names[sbuf.type],
sbuf.id, /* module id */
sbuf.offset, /* offset into modtype struct */
- sbuf.area, /* address module loaded at */
- sbuf.size, /* size in pages(K) */
- sbuf.private, /* kernel address of private area */
- sbuf.ver, /* Version; always 1 for now */
+ (long)sbuf.area, /* address module loaded at */
+ (long)sbuf.size, /* size in pages(K) */
+ (long)sbuf.private, /* kernel address of private area */
+ (long)sbuf.ver, /* Version; always 1 for now */
sbuf.name /* name from private area */
);
diff --git a/usr.bin/more/more.c b/usr.bin/more/more.c
index ab6f546ad7d..7fdc8648ca3 100644
--- a/usr.bin/more/more.c
+++ b/usr.bin/more/more.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: more.c,v 1.11 2000/02/01 03:23:34 deraadt Exp $ */
+/* $OpenBSD: more.c,v 1.12 2001/07/18 17:17:39 pvalchev Exp $ */
/*-
* Copyright (c) 1980 The Regents of the University of California.
* All rights reserved.
@@ -974,7 +974,7 @@ register FILE *f;
char colonch;
FILE *helpf;
int done;
- char comchar, cmdbuf[80], *p;
+ char comchar, cmdbuf[80];
char option[8];
char *EDITOR;
char *editor;
diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c
index 9948ee963fe..6173da114e9 100644
--- a/usr.bin/netstat/if.c
+++ b/usr.bin/netstat/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.23 2001/02/06 05:24:10 fgsch Exp $ */
+/* $OpenBSD: if.c,v 1.24 2001/07/18 17:17:39 pvalchev Exp $ */
/* $NetBSD: if.c,v 1.16.4.2 1996/06/07 21:46:46 thorpej Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "from: @(#)if.c 8.2 (Berkeley) 2/21/94";
#else
-static char *rcsid = "$OpenBSD: if.c,v 1.23 2001/02/06 05:24:10 fgsch Exp $";
+static char *rcsid = "$OpenBSD: if.c,v 1.24 2001/07/18 17:17:39 pvalchev Exp $";
#endif
#endif /* not lint */
@@ -99,7 +99,6 @@ intpr(interval, ifnetaddr)
struct sockaddr *sa;
struct ifnet_head ifhead; /* TAILQ_HEAD */
char name[IFNAMSIZ];
- int n;
if (ifnetaddr == 0) {
printf("ifnet: symbol not defined\n");
@@ -520,15 +519,15 @@ loop:
if (lastif - iftot > 0) {
if (bflag)
printf(" %10lu %8.8s %10lu %5.5s",
- sum->ift_ib - total->ift_ib, " ",
- sum->ift_ob - total->ift_ob, " ");
+ (unsigned long)sum->ift_ib - total->ift_ib, " ",
+ (unsigned long)sum->ift_ob - total->ift_ob, " ");
else
printf(" %8lu %5lu %8lu %5lu %5lu",
- sum->ift_ip - total->ift_ip,
- sum->ift_ie - total->ift_ie,
- sum->ift_op - total->ift_op,
- sum->ift_oe - total->ift_oe,
- sum->ift_co - total->ift_co);
+ (unsigned long)sum->ift_ip - total->ift_ip,
+ (unsigned long)sum->ift_ie - total->ift_ie,
+ (unsigned long)sum->ift_op - total->ift_op,
+ (unsigned long)sum->ift_oe - total->ift_oe,
+ (unsigned long)sum->ift_co - total->ift_co);
if (dflag)
printf(" %5d", sum->ift_dr - total->ift_dr);
}
diff --git a/usr.bin/oldrdist/docmd.c b/usr.bin/oldrdist/docmd.c
index 23f17160abc..941663d9787 100644
--- a/usr.bin/oldrdist/docmd.c
+++ b/usr.bin/oldrdist/docmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: docmd.c,v 1.12 1999/08/17 09:13:16 millert Exp $ */
+/* $OpenBSD: docmd.c,v 1.13 2001/07/18 17:17:39 pvalchev Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -35,7 +35,7 @@
#ifndef lint
/* from: static char sccsid[] = "@(#)docmd.c 8.1 (Berkeley) 6/9/93"; */
-static char *rcsid = "$OpenBSD: docmd.c,v 1.12 1999/08/17 09:13:16 millert Exp $";
+static char *rcsid = "$OpenBSD: docmd.c,v 1.13 2001/07/18 17:17:39 pvalchev Exp $";
#endif /* not lint */
#include "defs.h"
@@ -130,7 +130,7 @@ doarrow(filev, files, rhost, cmds)
int n, ddir, opts = options;
if (debug)
- printf("doarrow(%x, %s, %x)\n", files, rhost, cmds);
+ printf("doarrow(%lx, %s, %lx)\n", (long)files, rhost, (long)cmds);
if (files == NULL) {
error("no files to be updated\n");
@@ -221,7 +221,9 @@ makeconn(rhost)
char tuser[20];
int n;
extern char user[];
+#if defined(DIRECT_RCMD)
extern int userid;
+#endif
if (debug)
printf("makeconn(%s)\n", rhost);
@@ -393,7 +395,7 @@ dodcolon(filev, files, stamp, cmds)
return;
}
if (debug)
- printf("%s: %ld\n", stamp, stb.st_mtime);
+ printf("%s: %lld\n", stamp, (long long)stb.st_mtime);
subcmds = cmds;
lastmod = stb.st_mtime;
@@ -498,7 +500,7 @@ rcmptime(st)
int len;
if (debug)
- printf("rcmptime(%x)\n", st);
+ printf("rcmptime(%lx)\n", (long)st);
if ((d = opendir(target)) == NULL) {
error("%s: %s\n", target, strerror(errno));
diff --git a/usr.bin/oldrdist/expand.c b/usr.bin/oldrdist/expand.c
index 8024f1dd16e..16b14f54c5c 100644
--- a/usr.bin/oldrdist/expand.c
+++ b/usr.bin/oldrdist/expand.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: expand.c,v 1.6 1997/02/09 19:24:57 deraadt Exp $ */
+/* $OpenBSD: expand.c,v 1.7 2001/07/18 17:17:39 pvalchev Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -35,7 +35,7 @@
#ifndef lint
/* from: static char sccsid[] = "@(#)expand.c 8.1 (Berkeley) 6/9/93"; */
-static char *rcsid = "$OpenBSD: expand.c,v 1.6 1997/02/09 19:24:57 deraadt Exp $";
+static char *rcsid = "$OpenBSD: expand.c,v 1.7 2001/07/18 17:17:39 pvalchev Exp $";
#endif /* not lint */
#include "defs.h"
@@ -94,7 +94,7 @@ expand(list, wh)
char *argvbuf[GAVSIZ];
if (debug) {
- printf("expand(%x, %d)\nlist = ", list, wh);
+ printf("expand(%lx, %d)\nlist = ", (long)list, wh);
prnames(list);
}
diff --git a/usr.bin/oldrdist/main.c b/usr.bin/oldrdist/main.c
index c66251a469b..90c91936b52 100644
--- a/usr.bin/oldrdist/main.c
+++ b/usr.bin/oldrdist/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.8 1997/07/25 21:05:36 mickey Exp $ */
+/* $OpenBSD: main.c,v 1.9 2001/07/18 17:17:39 pvalchev Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -41,7 +41,7 @@ static char copyright[] =
#ifndef lint
/* from: static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/9/93"; */
-static char *rcsid = "$OpenBSD: main.c,v 1.8 1997/07/25 21:05:36 mickey Exp $";
+static char *rcsid = "$OpenBSD: main.c,v 1.9 2001/07/18 17:17:39 pvalchev Exp $";
#endif /* not lint */
#include "defs.h"
@@ -84,7 +84,7 @@ main(argc, argv)
char *argv[];
{
register char *arg;
- int cmdargs = 0, fd;
+ int cmdargs = 0;
char *dhosts[NHOSTS], **hp = dhosts;
pw = getpwuid(userid = getuid());
diff --git a/usr.bin/pctr/pctr.c b/usr.bin/pctr/pctr.c
index b9b47ed2c94..3467d055b9d 100644
--- a/usr.bin/pctr/pctr.c
+++ b/usr.bin/pctr/pctr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pctr.c,v 1.5 2001/06/05 05:05:39 pvalchev Exp $ */
+/* $OpenBSD: pctr.c,v 1.6 2001/07/18 17:17:39 pvalchev Exp $ */
/*
* Pentium performance counter control program for OpenBSD.
@@ -12,6 +12,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <sys/param.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -442,7 +443,6 @@ usage (void)
int
main (int argc, char **argv)
{
- int fd;
u_int ctr;
char *cp;
u_int fn, fl = 0;
diff --git a/usr.bin/size/size.c b/usr.bin/size/size.c
index 13643568f25..2581ded0ca5 100644
--- a/usr.bin/size/size.c
+++ b/usr.bin/size/size.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: size.c,v 1.12 2001/05/31 16:26:59 smart Exp $ */
+/* $OpenBSD: size.c,v 1.13 2001/07/18 17:17:39 pvalchev Exp $ */
/* $NetBSD: size.c,v 1.7 1996/01/14 23:07:12 pk Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)size.c 8.2 (Berkeley) 12/9/93";
#endif
-static char rcsid[] = "$OpenBSD: size.c,v 1.12 2001/05/31 16:26:59 smart Exp $";
+static char rcsid[] = "$OpenBSD: size.c,v 1.13 2001/07/18 17:17:39 pvalchev Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -298,8 +298,8 @@ show_objfile(count, name, fp)
(void)printf("text\tdata\tbss\tdec\thex\n");
}
total = head.a_text + head.a_data + head.a_bss;
- (void)printf("%lu\t%lu\t%lu\t%lu\t%lx", head.a_text, head.a_data,
- head.a_bss, total, total);
+ (void)printf("%lu\t%lu\t%lu\t%lu\t%lx", (unsigned long)head.a_text,
+ (unsigned long)head.a_data, (unsigned long)head.a_bss, total, total);
if (count > 1)
(void)printf("\t%s", name);
diff --git a/usr.bin/strip/strip.c b/usr.bin/strip/strip.c
index 16b74b24d5c..fa1263ff8d3 100644
--- a/usr.bin/strip/strip.c
+++ b/usr.bin/strip/strip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strip.c,v 1.13 2000/10/12 10:15:38 art Exp $ */
+/* $OpenBSD: strip.c,v 1.14 2001/07/18 17:17:39 pvalchev Exp $ */
/*
* Copyright (c) 1988 Regents of the University of California.
@@ -41,7 +41,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)strip.c 5.8 (Berkeley) 11/6/91";*/
-static char rcsid[] = "$OpenBSD: strip.c,v 1.13 2000/10/12 10:15:38 art Exp $";
+static char rcsid[] = "$OpenBSD: strip.c,v 1.14 2001/07/18 17:17:39 pvalchev Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -149,7 +149,10 @@ s_sym(fn, fd, ep, sp)
register EXEC *ep;
struct stat *sp;
{
- register char *neweof, *mineof;
+ register char *neweof;
+#if 0
+ register char *mineof;
+#endif
int zmagic;
zmagic = ep->a_data &&
@@ -215,7 +218,7 @@ s_stab(fn, fd, ep, sp)
EXEC *ep;
struct stat *sp;
{
- register int cnt, len, nsymcnt;
+ register int cnt, len;
register char *nstr, *nstrbase, *p, *strbase;
register NLIST *sym, *nsym;
u_long allocsize;