More warnings cleanups, some of which were actually real...

diff --git a/getdomainname.c b/getdomainname.c
index 4c7deff..4cd68a3 100644
--- a/getdomainname.c
+++ b/getdomainname.c
@@ -19,5 +19,7 @@
     return -1;
   }
 
+  strcpy(name, un.domainname);
+
   return 0;
 }
diff --git a/gethostname.c b/gethostname.c
index 938d277..6c5062e 100644
--- a/gethostname.c
+++ b/gethostname.c
@@ -19,5 +19,7 @@
     return -1;
   }
 
+  strcpy(name, un.nodename);
+
   return 0;
 }
diff --git a/getopt.c b/getopt.c
index bccd301..5a992dc 100644
--- a/getopt.c
+++ b/getopt.c
@@ -19,6 +19,9 @@
   const char *osptr;
   int opt;
 
+  /* We don't actually need argc */
+  (void)argc;
+
   /* First, eliminate all non-option cases */
   
   if ( !carg || carg[0] != '-' || !carg[1] ) {
diff --git a/include/stdio.h b/include/stdio.h
index d6f0c1d..a413df3 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -46,7 +46,7 @@
 
 static __inline__ FILE *fdopen(int __fd, const char *__m)
 {
-  return __create_file(__fd);
+  (void)__m; return __create_file(__fd);
 }
 static __inline__ int fclose(FILE *__f)
 {
diff --git a/klibc/MCONFIG b/klibc/MCONFIG
index af3971e..781e547 100644
--- a/klibc/MCONFIG
+++ b/klibc/MCONFIG
@@ -10,7 +10,7 @@
 REQFLAGS = -nostdinc -iwithprefix include -I. \
 	  -I./arch/$(ARCH)/include -I./include/bits$(BITSIZE) \
 	  -DBITSIZE=$(BITSIZE) -I./include -I./linux/include \
-	  -Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline
+	  -W -Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline
 CFLAGS  = $(OPTFLAGS) $(REQFLAGS)
 LDFLAGS =
 AR      = $(CROSS)ar
diff --git a/klibc/getdomainname.c b/klibc/getdomainname.c
index 4c7deff..4cd68a3 100644
--- a/klibc/getdomainname.c
+++ b/klibc/getdomainname.c
@@ -19,5 +19,7 @@
     return -1;
   }
 
+  strcpy(name, un.domainname);
+
   return 0;
 }
diff --git a/klibc/gethostname.c b/klibc/gethostname.c
index 938d277..6c5062e 100644
--- a/klibc/gethostname.c
+++ b/klibc/gethostname.c
@@ -19,5 +19,7 @@
     return -1;
   }
 
+  strcpy(name, un.nodename);
+
   return 0;
 }
diff --git a/klibc/getopt.c b/klibc/getopt.c
index bccd301..5a992dc 100644
--- a/klibc/getopt.c
+++ b/klibc/getopt.c
@@ -19,6 +19,9 @@
   const char *osptr;
   int opt;
 
+  /* We don't actually need argc */
+  (void)argc;
+
   /* First, eliminate all non-option cases */
   
   if ( !carg || carg[0] != '-' || !carg[1] ) {
diff --git a/klibc/include/stdio.h b/klibc/include/stdio.h
index d6f0c1d..a413df3 100644
--- a/klibc/include/stdio.h
+++ b/klibc/include/stdio.h
@@ -46,7 +46,7 @@
 
 static __inline__ FILE *fdopen(int __fd, const char *__m)
 {
-  return __create_file(__fd);
+  (void)__m; return __create_file(__fd);
 }
 static __inline__ int fclose(FILE *__f)
 {
diff --git a/klibc/tests/malloctest.c b/klibc/tests/malloctest.c
index ad2292c..64e8e79 100644
--- a/klibc/tests/malloctest.c
+++ b/klibc/tests/malloctest.c
@@ -4105,7 +4105,7 @@
 
 char *pointers[NCYCLES];
 
-int main(int argc, char *argv[])
+int main(void)
 {
   int r, i, j, sp, sq;
   char *p, *q, *ep, *eq;
diff --git a/klibc/tests/nfs_no_rpc.c b/klibc/tests/nfs_no_rpc.c
index 8ae2a7e..11b9f61 100644
--- a/klibc/tests/nfs_no_rpc.c
+++ b/klibc/tests/nfs_no_rpc.c
@@ -1,11 +1,13 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/utsname.h>
+#include <sys/mount.h>
 #include <netinet/in.h>
 #include <unistd.h>
 #include <signal.h>
 #include <string.h>
 #include <stdlib.h>
+#include <stdio.h>
 
 /* Default path we try to mount. "%s" gets replaced by our IP address */
 #define NFS_ROOT		"/tftpboot/%s"
@@ -268,6 +270,7 @@
 static int flag;
 static void timeout(int n)
 {
+	(void)n;
 	flag = 1;
 }
 static int do_call(struct sockaddr_in *sin, u_int32_t msg[], u_int32_t rmsg[],
@@ -472,12 +475,14 @@
 	return 0;
 }
 
-int main(int argc, char *argv[])
+int main(void)
 {
 	unsigned char *p;
 	struct timeval tv;
 	char *s;
 
+	/* FIX: use getopt() instead of this */
+
 	s = getenv("root_server_addr");
 	if (s)
 		root_server_addr = strtoul(s, NULL, 10);
diff --git a/klibc/tests/testrand48.c b/klibc/tests/testrand48.c
index 8eb2b3b..bf046b6 100644
--- a/klibc/tests/testrand48.c
+++ b/klibc/tests/testrand48.c
@@ -1,7 +1,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-int main(int argc, char *argv[])
+int main(void)
 {
   unsigned short seed1[] = { 0x1234, 0x5678, 0x9abc };
   unsigned short *oldseed;
diff --git a/klibc/tests/testvsnp.c b/klibc/tests/testvsnp.c
index 8af3774..c86e8b3 100644
--- a/klibc/tests/testvsnp.c
+++ b/klibc/tests/testvsnp.c
@@ -5,7 +5,7 @@
 #include <string.h>
 #include <stdio.h>
 
-int main(int argc, char *argv[])
+int main(void)
 {
   int r, i;
   char buffer[512];
diff --git a/tests/malloctest.c b/tests/malloctest.c
index ad2292c..64e8e79 100644
--- a/tests/malloctest.c
+++ b/tests/malloctest.c
@@ -4105,7 +4105,7 @@
 
 char *pointers[NCYCLES];
 
-int main(int argc, char *argv[])
+int main(void)
 {
   int r, i, j, sp, sq;
   char *p, *q, *ep, *eq;
diff --git a/tests/nfs_no_rpc.c b/tests/nfs_no_rpc.c
index 8ae2a7e..11b9f61 100644
--- a/tests/nfs_no_rpc.c
+++ b/tests/nfs_no_rpc.c
@@ -1,11 +1,13 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/utsname.h>
+#include <sys/mount.h>
 #include <netinet/in.h>
 #include <unistd.h>
 #include <signal.h>
 #include <string.h>
 #include <stdlib.h>
+#include <stdio.h>
 
 /* Default path we try to mount. "%s" gets replaced by our IP address */
 #define NFS_ROOT		"/tftpboot/%s"
@@ -268,6 +270,7 @@
 static int flag;
 static void timeout(int n)
 {
+	(void)n;
 	flag = 1;
 }
 static int do_call(struct sockaddr_in *sin, u_int32_t msg[], u_int32_t rmsg[],
@@ -472,12 +475,14 @@
 	return 0;
 }
 
-int main(int argc, char *argv[])
+int main(void)
 {
 	unsigned char *p;
 	struct timeval tv;
 	char *s;
 
+	/* FIX: use getopt() instead of this */
+
 	s = getenv("root_server_addr");
 	if (s)
 		root_server_addr = strtoul(s, NULL, 10);
diff --git a/tests/testrand48.c b/tests/testrand48.c
index 8eb2b3b..bf046b6 100644
--- a/tests/testrand48.c
+++ b/tests/testrand48.c
@@ -1,7 +1,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-int main(int argc, char *argv[])
+int main(void)
 {
   unsigned short seed1[] = { 0x1234, 0x5678, 0x9abc };
   unsigned short *oldseed;
diff --git a/tests/testvsnp.c b/tests/testvsnp.c
index 8af3774..c86e8b3 100644
--- a/tests/testvsnp.c
+++ b/tests/testvsnp.c
@@ -5,7 +5,7 @@
 #include <string.h>
 #include <stdio.h>
 
-int main(int argc, char *argv[])
+int main(void)
 {
   int r, i;
   char buffer[512];