Date: Mon, 18 Jan 2010 23:13:22 +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: r202603 - head/share/examples/kld/cdev/test Message-ID: <201001182313.o0INDMNE006575@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001182313.o0INDMNE006575>