diff options
author | wkoszek <wkoszek@FreeBSD.org> | 2010-01-18 23:13:22 +0000 |
---|---|---|
committer | wkoszek <wkoszek@FreeBSD.org> | 2010-01-18 23:13:22 +0000 |
commit | 8459369f843d8c74a1532de5711f1d26a96a7f38 (patch) | |
tree | ebd87fa7392fe7b64cc1d45a0ba80a19fdf9ac86 | |
parent | 202bd73aeafc8c3afb5735d03a398aa7f1a2e08a (diff) | |
download | FreeBSD-src-8459369f843d8c74a1532de5711f1d26a96a7f38.zip FreeBSD-src-8459369f843d8c74a1532de5711f1d26a96a7f38.tar.gz |
Include unistd.h for read(), write() and stdlib.h for exit().
Bump WARNS to 5 while being here.
-rw-r--r-- | share/examples/kld/cdev/test/Makefile | 1 | ||||
-rw-r--r-- | share/examples/kld/cdev/test/testcdev.c | 8 |
2 files changed, 6 insertions, 3 deletions
diff --git a/share/examples/kld/cdev/test/Makefile b/share/examples/kld/cdev/test/Makefile index 333cdcb..17911ee 100644 --- a/share/examples/kld/cdev/test/Makefile +++ b/share/examples/kld/cdev/test/Makefile @@ -68,6 +68,7 @@ # PROG= testcdev NO_MAN= +WARNS= 5 MODSTAT= /sbin/kldstat diff --git a/share/examples/kld/cdev/test/testcdev.c b/share/examples/kld/cdev/test/testcdev.c index 0a61181..50b5ef8 100644 --- a/share/examples/kld/cdev/test/testcdev.c +++ b/share/examples/kld/cdev/test/testcdev.c @@ -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; |