diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1996-12-21 22:23:53 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1996-12-21 22:23:53 +0000 |
commit | c60e06beeb20521a15bacc5c672aa1b865b06a67 (patch) | |
tree | f2cc3a0e68a020f5e59132403d4a16547626359f /sys/arch/i386/isa/pcvt/Util/loadfont | |
parent | f2d04b4c3d006dcc05c58dab6068fed44f01098a (diff) |
-Wall madness.
Diffstat (limited to 'sys/arch/i386/isa/pcvt/Util/loadfont')
-rw-r--r-- | sys/arch/i386/isa/pcvt/Util/loadfont/loadfont.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/sys/arch/i386/isa/pcvt/Util/loadfont/loadfont.c b/sys/arch/i386/isa/pcvt/Util/loadfont/loadfont.c index 3d66fd8e932..3c10e5c8003 100644 --- a/sys/arch/i386/isa/pcvt/Util/loadfont/loadfont.c +++ b/sys/arch/i386/isa/pcvt/Util/loadfont/loadfont.c @@ -47,9 +47,12 @@ static char *id = * *---------------------------------------------------------------------------*/ -#include <stdio.h> -#include <fcntl.h> #include <errno.h> +#include <fcntl.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <machine/pcvt_ioctl.h> @@ -69,6 +72,7 @@ static void printvgafontattr(int charset); static void printheader(void); static void usage(void); +int main(int argc, char **argv) { extern int optind; @@ -85,11 +89,11 @@ main(int argc, char **argv) int scan_lines = -1; int c; int chr_set = -1; - char *filename; + char *filename = NULL; int fflag = -1; int info = -1; int dflag = 0; - char *device; + char *device = NULL; while( (c = getopt(argc, argv, "c:d:f:is:")) != EOF) { @@ -238,8 +242,8 @@ main(int argc, char **argv) if(chr_height * 256 != sbp->st_size || chr_height < 8 || chr_height > 20) { fprintf(stderr, - "File is no valid font file, size = %d.\n", - sbp->st_size); + "File is no valid font file, size = %ld.\n", + (long)sbp->st_size); exit(1); } @@ -256,9 +260,9 @@ main(int argc, char **argv) sbp->st_size) { fprintf(stderr, - "error reading file %s, size = %d, read = %d, " + "error reading file %s, size = %ld, read = %d, " "errno %d\n", - argv[1], sbp->st_size, ret, errno); + argv[1], (long)sbp->st_size, ret, errno); exit(1); } |