use full prototypes
diff --git a/src/cmd/astro/dist.c b/src/cmd/astro/dist.c
index 3aec875..91175a6 100644
--- a/src/cmd/astro/dist.c
+++ b/src/cmd/astro/dist.c
@@ -192,7 +192,7 @@
 	p->flag = flag;
 }
 
-int	evcomp();
+int	evcomp(const void*, const void*);
 
 void
 evflush(void)
@@ -214,13 +214,13 @@
 }
 
 int
-evcomp(void *a1, void *a2)
+evcomp(const void *a1, const void *a2)
 {
 	double t1, t2;
 	Event *p1, *p2;
 
-	p1 = a1;
-	p2 = a2;
+	p1 = (Event*)a1;
+	p2 = (Event*)a2;
 	t1 = p1->tim;
 	t2 = p2->tim;
 	if(p1->flag & SIGNIF)
diff --git a/src/cmd/auth/ssh-agent.c b/src/cmd/auth/ssh-agent.c
index f8ded13..beae7ef 100644
--- a/src/cmd/auth/ssh-agent.c
+++ b/src/cmd/auth/ssh-agent.c
@@ -950,7 +950,7 @@
 		ek = getmp(&m);
 		mod = getmp(&m);
 		chal = getmp(&m);
-		if((p = getn(&m, 16)) == nil){
+		if((p = (char*)getn(&m, 16)) == nil){
 		Failchal:
 			mpfree(ek);
 			mpfree(mod);
@@ -977,8 +977,8 @@
 		break;
 
 	case SSH2_AGENTC_SIGN_REQUEST:
-		if(getm(&m, &mkey) < 0
-		|| getm(&m, &mdata) < 0)
+		if(getm(&m, &mkey) == nil
+		|| getm(&m, &mdata) == nil)
 			goto Failure;
 		flags = get4(&m);
 		if(flags & SSH_AGENT_OLD_SIGNATURE)
diff --git a/src/cmd/join.c b/src/cmd/join.c
index 7efff97..1739ef5 100644
--- a/src/cmd/join.c
+++ b/src/cmd/join.c
@@ -165,7 +165,7 @@
 #define get1() n1=input(F1)
 #define get2() n2=input(F2)
 void
-seek2()
+seek2(void)
 {
 	int n1, n2;
 	int top2=0;
@@ -208,7 +208,7 @@
 	}
 }
 void
-seek1()
+seek1(void)
 {
 	int n1, n2;
 	int top1=0;
diff --git a/src/cmd/map/map.c b/src/cmd/map/map.c
index 8d4dbfc..74ae79a 100644
--- a/src/cmd/map/map.c
+++ b/src/cmd/map/map.c
@@ -1204,7 +1204,7 @@
 }
 
 void
-realcut()
+realcut(void)
 {
 	struct place g;
 	double lat;
diff --git a/src/cmd/mk/unix.c b/src/cmd/mk/unix.c
index 12f391c..28951f5 100644
--- a/src/cmd/mk/unix.c
+++ b/src/cmd/mk/unix.c
@@ -278,7 +278,7 @@
 }
 
 void
-catchnotes()
+catchnotes(void)
 {
 	int i;
 
diff --git a/src/cmd/postscript/common/bbox.c b/src/cmd/postscript/common/bbox.c
index 67dabf3..b6807a4 100644
--- a/src/cmd/postscript/common/bbox.c
+++ b/src/cmd/postscript/common/bbox.c
@@ -67,7 +67,7 @@
 }   /* End of cover */
 
 /*****************************************************************************/
-void	resetbbox();
+void	resetbbox(int);
 
 void
 writebbox(fp, keyword, slop)
diff --git a/src/cmd/postscript/common/misc.c b/src/cmd/postscript/common/misc.c
index dd34c6d..aca58f0 100644
--- a/src/cmd/postscript/common/misc.c
+++ b/src/cmd/postscript/common/misc.c
@@ -24,7 +24,6 @@
 int cat(char *file);
 
 /*****************************************************************************/
-extern	int	str_convert();
 
 void
 out_list(str)
diff --git a/src/cmd/postscript/download/download.c b/src/cmd/postscript/download/download.c
index fa1d988..31aa1b3 100644
--- a/src/cmd/postscript/download/download.c
+++ b/src/cmd/postscript/download/download.c
@@ -88,16 +88,16 @@
 FILE	*fp_in;				/* next input file */
 FILE	*fp_temp = NULL;		/* for copying stdin */
 
-void init_signals();
-void options();
-void readmap();
-void readresident();
-void arguments();
-void done();
-void download();
+void init_signals(void);
+void options(void);
+void readmap(void);
+void readresident(void);
+void arguments(void);
+void done(void);
+void download(void);
 int lookup(char *font);
 void copyfonts(char *list);
-void copyinput();
+void copyinput(void);
 extern int cat(char *file);
 extern void error(int errtype, char *fmt, ...);
 
diff --git a/src/cmd/sam/disk.c b/src/cmd/sam/disk.c
index f27e94b..81c9838 100644
--- a/src/cmd/sam/disk.c
+++ b/src/cmd/sam/disk.c
@@ -25,7 +25,7 @@
 #endif
 
 Disk*
-diskinit()
+diskinit(void)
 {
 	Disk *d;
 
diff --git a/src/libhtml/lex.c b/src/libhtml/lex.c
index 9a47dde..0755ac3 100644
--- a/src/libhtml/lex.c
+++ b/src/libhtml/lex.c
@@ -416,7 +416,7 @@
 static StringInt*	tagtable;		// initialized from tagnames
 static StringInt*	attrtable;		// initialized from attrnames
 
-static void		lexinit();
+static void		lexinit(void);
 static int		getplaindata(TokenSource* ts, Token* a, int* pai);
 static int		getdata(TokenSource* ts, int firstc, int starti, Token* a, int* pai);
 static int		getscriptdata(TokenSource* ts, int firstc, int starti, Token* a, int* pai);
diff --git a/src/libthread/thread.c b/src/libthread/thread.c
index ddd7564..387b640 100644
--- a/src/libthread/thread.c
+++ b/src/libthread/thread.c
@@ -141,7 +141,7 @@
 	y = z;
 	z >>= 16;	/* hide undefined 32-bit shift from 32-bit compilers */
 	x = z>>16;
-	makecontext(&t->context.uc, (void(*)())threadstart, 2, y, x);
+	makecontext(&t->context.uc, (void(*)(void))threadstart, 2, y, x);
 
 	return t;
 }