svn commit: r202602 - head/share/examples/kld/syscall/test

Wojciech A. Koszek wkoszek at FreeBSD.org
Mon Jan 18 23:09:08 UTC 2010


Author: wkoszek
Date: Mon Jan 18 23:09:07 2010
New Revision: 202602
URL: http://svn.freebsd.org/changeset/base/202602

Log:
  Small cleanup while being here:
  - sort includes
  - remove usage(), since it seems to come from older version
    of the KLD
  - remove unnecessary variable
  - mark argc/argv as unused
  
  Bring WARNS = 5 to the Makefile.

Modified:
  head/share/examples/kld/syscall/test/Makefile
  head/share/examples/kld/syscall/test/call.c

Modified: head/share/examples/kld/syscall/test/Makefile
==============================================================================
--- head/share/examples/kld/syscall/test/Makefile	Mon Jan 18 23:04:38 2010	(r202601)
+++ head/share/examples/kld/syscall/test/Makefile	Mon Jan 18 23:09:07 2010	(r202602)
@@ -3,5 +3,6 @@
 
 PROG=	call
 NO_MAN=
+WARNS+=	5
 
 .include <bsd.prog.mk>

Modified: head/share/examples/kld/syscall/test/call.c
==============================================================================
--- head/share/examples/kld/syscall/test/call.c	Mon Jan 18 23:04:38 2010	(r202601)
+++ head/share/examples/kld/syscall/test/call.c	Mon Jan 18 23:09:07 2010	(r202602)
@@ -26,26 +26,17 @@
  * $FreeBSD$
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/syscall.h>
 #include <sys/types.h>
 #include <sys/module.h>
+#include <sys/syscall.h>
 
-static void usage (void);
-
-static void
-usage (void)
-{
-	fprintf (stderr, "call syscall-number\n");
-	exit (1);
-}
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
 int
-main(int argc, char **argv)
+main(int argc __unused, char **argv __unused)
 {
-	char *endptr;
 	int syscall_num;
 	struct module_stat stat;
 


More information about the svn-src-all mailing list