summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2006-08-31 19:19:44 +0000
committerru <ru@FreeBSD.org>2006-08-31 19:19:44 +0000
commitede4b2e9ac8d2ecd4f1202ac32e5f674882d7f07 (patch)
treee7c2814011f5b85ac3040f46787eb57f6a7fea41 /usr.bin
parent5ffd88a18e7677876e4d2a9235c958d3b97f9abb (diff)
downloadFreeBSD-src-ede4b2e9ac8d2ecd4f1202ac32e5f674882d7f07.zip
FreeBSD-src-ede4b2e9ac8d2ecd4f1202ac32e5f674882d7f07.tar.gz
Fix compilation warnings (up to level 3).
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tip/libacu/hayes.c3
-rw-r--r--usr.bin/tip/libacu/v831.c2
-rw-r--r--usr.bin/tip/tip/cmds.c8
-rw-r--r--usr.bin/tip/tip/cmdtab.c2
-rw-r--r--usr.bin/tip/tip/tip.c4
-rw-r--r--usr.bin/tip/tip/tipout.c2
-rw-r--r--usr.bin/tip/tip/uucplock.c1
-rw-r--r--usr.bin/tip/tip/value.c4
8 files changed, 14 insertions, 12 deletions
diff --git a/usr.bin/tip/libacu/hayes.c b/usr.bin/tip/libacu/hayes.c
index 9e38830..fe52274 100644
--- a/usr.bin/tip/libacu/hayes.c
+++ b/usr.bin/tip/libacu/hayes.c
@@ -177,7 +177,8 @@ gobble(char *match)
{
char c;
sig_t f;
- int i, status = 0;
+ size_t i;
+ int status = 0;
f = signal(SIGALRM, sigALRM);
dialtimeout = 0;
diff --git a/usr.bin/tip/libacu/v831.c b/usr.bin/tip/libacu/v831.c
index 95770eb..7adc3c6 100644
--- a/usr.bin/tip/libacu/v831.c
+++ b/usr.bin/tip/libacu/v831.c
@@ -176,7 +176,7 @@ struct vaconfig {
} vaconfig[] = {
{ "/dev/cua0",'4','0' },
{ "/dev/cua1",'4','1' },
- { 0 }
+ { NULL, '\0', '\0' }
};
#define pc(x) (c = x, write(AC,&c,1))
diff --git a/usr.bin/tip/tip/cmds.c b/usr.bin/tip/tip/cmds.c
index 6f2e2b7..f6badcb 100644
--- a/usr.bin/tip/tip/cmds.c
+++ b/usr.bin/tip/tip/cmds.c
@@ -184,8 +184,8 @@ transfer(char *buf, int fd, char *eofchars)
if (c == '\n' && boolean(value(VERBOSE)))
printf("\r%d", ++ct);
- if ((cnt = (p-buffer)) == number(value(FRAMESIZE))) {
- if (write(fd, buffer, cnt) != cnt) {
+ if ((cnt = (p-buffer)) == (size_t)number(value(FRAMESIZE))) {
+ if ((size_t)write(fd, buffer, cnt) != cnt) {
printf("\r\nwrite error\r\n");
quit = 1;
}
@@ -193,7 +193,7 @@ transfer(char *buf, int fd, char *eofchars)
}
}
if ((cnt = (p-buffer)))
- if (write(fd, buffer, cnt) != cnt)
+ if ((size_t)write(fd, buffer, cnt) != cnt)
printf("\r\nwrite error\r\n");
if (boolean(value(VERBOSE)))
@@ -885,7 +885,7 @@ hardwareflow(char *option)
void
linedisc(char *option)
{
- int ld = (int)value(LINEDISC);
+ int ld = (int)(intptr_t)value(LINEDISC);
ioctl(FD, TIOCSETD, &ld);
}
diff --git a/usr.bin/tip/tip/cmdtab.c b/usr.bin/tip/tip/cmdtab.c
index 9e74d28..3666c12 100644
--- a/usr.bin/tip/tip/cmdtab.c
+++ b/usr.bin/tip/tip/cmdtab.c
@@ -62,5 +62,5 @@ esctable_t etable[] = {
{ 'v', NORM, "list variables", listvariables },
{ '?', NORM, "get this summary", help },
{ '#', NORM, "send break", genbrk },
- { 0, 0, 0 }
+ { '\0', 0, NULL, NULL }
};
diff --git a/usr.bin/tip/tip/tip.c b/usr.bin/tip/tip/tip.c
index 937efcc..22b362c 100644
--- a/usr.bin/tip/tip/tip.c
+++ b/usr.bin/tip/tip/tip.c
@@ -233,7 +233,7 @@ cucommon:
(void)signal(SIGALRM, timeout);
if (value(LINEDISC) != TTYDISC) {
- int ld = (int)value(LINEDISC);
+ int ld = (int)(intptr_t)value(LINEDISC);
ioctl(FD, TIOCSETD, &ld);
}
@@ -565,7 +565,7 @@ static char partab[0200];
void
parwrite(int fd, char *buf, size_t n)
{
- int i;
+ size_t i;
char *bp;
bp = buf;
diff --git a/usr.bin/tip/tip/tipout.c b/usr.bin/tip/tip/tipout.c
index e043bb3..42fc4a2 100644
--- a/usr.bin/tip/tip/tipout.c
+++ b/usr.bin/tip/tip/tipout.c
@@ -82,7 +82,7 @@ intEMT(int signo)
char reply;
read(fildes[0], &c, 1);
- while (c != '\n' && pline - line < sizeof(line)) {
+ while (c != '\n' && (size_t)(pline - line) < sizeof(line)) {
*pline++ = c;
read(fildes[0], &c, 1);
}
diff --git a/usr.bin/tip/tip/uucplock.c b/usr.bin/tip/tip/uucplock.c
index 9fd1a11..81e463e 100644
--- a/usr.bin/tip/tip/uucplock.c
+++ b/usr.bin/tip/tip/uucplock.c
@@ -49,6 +49,7 @@ static const char rcsid[] = "$OpenBSD: uucplock.c,v 1.11 2006/03/16 19:32:46 der
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
+#include "tip.h"
#include "pathnames.h"
/*
diff --git a/usr.bin/tip/tip/value.c b/usr.bin/tip/tip/value.c
index 090369e..45ee7ce 100644
--- a/usr.bin/tip/tip/value.c
+++ b/usr.bin/tip/tip/value.c
@@ -172,7 +172,7 @@ vtoken(char *s)
if ((p = vlookup(s))) {
cp++;
if (p->v_type&NUMBER)
- vassign(p, (char *)atoi(cp));
+ vassign(p, (char *)(intptr_t)atoi(cp));
else {
if (strcmp(s, "record") == 0)
cp = expand(cp);
@@ -335,7 +335,7 @@ vstring(char *s, char *v)
if (p == 0)
return (1);
if (p->v_type&NUMBER)
- vassign(p, (char *)atoi(v));
+ vassign(p, (char *)(intptr_t)atoi(v));
else {
if (strcmp(s, "record") == 0)
v = expand(v);
OpenPOWER on IntegriCloud