svn commit: r202603 - head/share/examples/kld/cdev/test

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


Author: wkoszek
Date: Mon Jan 18 23:13:22 2010
New Revision: 202603
URL: http://svn.freebsd.org/changeset/base/202603

Log:
  Include unistd.h for read(), write() and stdlib.h for exit().
  Bump WARNS to 5 while being here.

Modified:
  head/share/examples/kld/cdev/test/Makefile
  head/share/examples/kld/cdev/test/testcdev.c

Modified: head/share/examples/kld/cdev/test/Makefile
==============================================================================
--- head/share/examples/kld/cdev/test/Makefile	Mon Jan 18 23:09:07 2010	(r202602)
+++ head/share/examples/kld/cdev/test/Makefile	Mon Jan 18 23:13:22 2010	(r202603)
@@ -68,6 +68,7 @@
 #
 PROG=	testcdev
 NO_MAN=
+WARNS=	5
 
 MODSTAT= /sbin/kldstat
 

Modified: head/share/examples/kld/cdev/test/testcdev.c
==============================================================================
--- head/share/examples/kld/cdev/test/testcdev.c	Mon Jan 18 23:09:07 2010	(r202602)
+++ head/share/examples/kld/cdev/test/testcdev.c	Mon Jan 18 23:13:22 2010	(r202603)
@@ -70,13 +70,15 @@
  *
  * $FreeBSD$
  */
+#include <sys/types.h>
+#include <sys/ioccom.h>
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <fcntl.h>
 #include <paths.h>
 #include <string.h>
-#include <sys/types.h>
-#include <sys/ioccom.h>
+#include <unistd.h>
 
 #define CDEV_IOCTL1     _IOR('C', 1, u_int)
 #define CDEV_DEVICE	"cdev"
@@ -85,7 +87,7 @@ static char writestr[] = "Hello kernel!"
 static char buf[512+1];
 
 int
-main(int argc, char *argv[])
+main(int argc __unused, char *argv[] __unused)
 {
     int kernel_fd;
     int one;


More information about the svn-src-all mailing list