Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jan 2010 23:09:07 +0000 (UTC)
From:      "Wojciech A. Koszek" <wkoszek@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r202602 - head/share/examples/kld/syscall/test
Message-ID:  <201001182309.o0IN97c9005596@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001182309.o0IN97c9005596>