diff options
| author | Xin LI <delphij@FreeBSD.org> | 2006-01-23 13:55:32 +0000 |
|---|---|---|
| committer | Xin LI <delphij@FreeBSD.org> | 2006-01-23 13:55:32 +0000 |
| commit | 50385af97a046537496fdcdaf556a05edef3e950 (patch) | |
| tree | 924a183c4f5ee3c5ce4845ac06cd9e8686bca769 /usr.sbin/btxld | |
| parent | 23639a23a8a67759634dc573f7c8afab9f50c830 (diff) | |
Notes
Diffstat (limited to 'usr.sbin/btxld')
| -rw-r--r-- | usr.sbin/btxld/Makefile | 2 | ||||
| -rw-r--r-- | usr.sbin/btxld/btxld.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/btxld/Makefile b/usr.sbin/btxld/Makefile index 32cf99d5edac..6ca452eec1c2 100644 --- a/usr.sbin/btxld/Makefile +++ b/usr.sbin/btxld/Makefile @@ -4,4 +4,6 @@ PROG= btxld MAN= btxld.8 SRCS= btxld.c elfh.c +WARNS?= 6 + .include <bsd.prog.mk> diff --git a/usr.sbin/btxld/btxld.c b/usr.sbin/btxld/btxld.c index 7acf842a1bea..f255fa552818 100644 --- a/usr.sbin/btxld/btxld.c +++ b/usr.sbin/btxld/btxld.c @@ -39,6 +39,8 @@ static const char rcsid[] = #undef __LDPGSZ #define __LDPGSZ 4096 +#include <netinet/in.h> + #include <a.out.h> #include <err.h> #include <errno.h> @@ -250,7 +252,7 @@ btxld(const char *iname) } btx.btx_pgctl -= cwr; btx.btx_entry = Eflag ? centry : ihdr.entry; - if (snprintf(name, sizeof(name), "%s.tmp", oname) >= sizeof(name)) + if ((size_t)snprintf(name, sizeof(name), "%s.tmp", oname) >= sizeof(name)) errx(2, "%s: Filename too long", oname); if ((fdo = open(name, O_CREAT | O_TRUNC | O_WRONLY, 0666)) == -1) err(2, "%s", name); @@ -480,7 +482,7 @@ writex(int fd, const void *buf, size_t nbyte) if ((n = write(fd, buf, nbyte)) == -1) err(2, "%s", tname); - if (n != nbyte) + if ((size_t)n != nbyte) errx(2, "%s: Short write", tname); } |
