summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-03-29 12:17:33 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-03-29 12:17:33 +0200
commit6de8f6e8b0d239bab4899d44e06def82bc80704f (patch)
treef4f7161bf73fabad5419ee2a0ce28edd278e7037
parent8763e1a7b17973eda0438b170e9f91b671997fc0 (diff)
com: Fix 64bit warnings
* i386/i386at/com.c (comopen, comclose, comparam, comstart, comtimer): Cast tp->t_addr to uinptr_t instead of int.
-rw-r--r--i386/i386at/com.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/i386/i386at/com.c b/i386/i386at/com.c
index 4689e30d..2bdbc0d0 100644
--- a/i386/i386at/com.c
+++ b/i386/i386at/com.c
@@ -368,7 +368,7 @@ io_return_t comopen(
/*rvb tp->t_state |= TS_WOPEN; */
if ((tp->t_state & TS_ISOPEN) == 0)
comparam(unit);
- addr = (int)tp->t_addr;
+ addr = (uintptr_t)tp->t_addr;
s = spltty();
if (!comcarrier[unit]) /* not originating */
@@ -405,7 +405,7 @@ dev_t dev;
int flag;
{
struct tty *tp = &com_tty[minor(dev)];
- u_short addr = (int)tp->t_addr;
+ u_short addr = (uintptr_t)tp->t_addr;
ttyclose(tp);
if (tp->t_state&TS_HUPCLS || (tp->t_state&TS_ISOPEN)==0) {
@@ -572,7 +572,7 @@ static void
comparam(int unit)
{
struct tty *tp = &com_tty[unit];
- u_short addr = (int)tp->t_addr;
+ u_short addr = (uintptr_t)tp->t_addr;
spl_t s = spltty();
int mode;
@@ -672,7 +672,7 @@ comst_3++;
comst_4++;
return(0);
}
- outb(TXRX((int)tp->t_addr), nch);
+ outb(TXRX((uintptr_t)tp->t_addr), nch);
}
#else
nch = getc(&tp->t_outq);
@@ -684,7 +684,7 @@ comst_4++;
comst_4++;
return;
}
- outb(TXRX((int)tp->t_addr), nch);
+ outb(TXRX((uintptr_t)tp->t_addr), nch);
tp->t_state |= TS_BUSY;
#endif
}
@@ -709,7 +709,7 @@ comtimer(void * param)
/* Its stuck */
printf("Tty %p was stuck\n", tp);
nch = getc(&tp->t_outq);
- outb(TXRX((int)tp->t_addr), nch);
+ outb(TXRX((uintptr_t)tp->t_addr), nch);
}
splx(s);