[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Small Patches for FreeMiNT 1.12.4
Here are some "very important" patches to get rid
of these nasty compiler warnings !
Dirk
------------------------------- schnipp --------------------------
diff -u Original/bios.c Patched/bios.c
--- Original/bios.c Sun Jun 11 13:39:45 1995
+++ Patched/bios.c Mon Jun 12 13:18:11 1995
@@ -312,7 +312,7 @@
if ((r = (long)b->tty->vmin - btty_ionread(b)) <= 0) {
b->vticks = 0;
wake(IO_Q, (long)b);
- l = b->rsel;
+ l = (void **)b->rsel;
if (*l)
wakeselect(*l);
} else if ((--r, r *= 2000L) > (unsigned long)b->ispeed) {
@@ -325,7 +325,7 @@
if (b->tty->state & TS_HOLD) return;
- l = b->wsel;
+ l = (void **)b->wsel;
if (*l) {
short i = b->orec->tail - b->orec->head;
if (i < 0)
@@ -351,7 +351,7 @@
if ((r = (long)b->tty->vmin - ionread(b->irec)) <= 0) {
b->vticks = 0;
wake(IO_Q, (long)b);
- l = b->rsel;
+ l = (void **)b->rsel;
if (*l)
wakeselect(*l);
} else if ((--r, r *= 2000L) > (unsigned long)31250) {
@@ -1188,7 +1188,7 @@
wake(IO_Q, (long)&console_in);
/* wake anyone that did a select() on the keyboard */
if (tty->rsel)
- wakeselect(tty->rsel);
+ wakeselect((PROC *)tty->rsel);
}
return ret;
diff -u Original/biosfs.c Patched/biosfs.c
--- Original/biosfs.c Sun Jun 11 13:39:46 1995
+++ Patched/biosfs.c Mon Jun 12 13:53:38 1995
@@ -1483,7 +1483,7 @@
{
IOREC_T *ior = 0;
long *cout = 0; /* keep compiler happy */
- long *ospeed;
+ long *ospeed = 0; /* same here */
struct tty *tty = 0; /* still not happy yet? */
const char *p = buf;
int slept = 0;
@@ -1708,7 +1708,7 @@
{
IOREC_T *ior = 0;
long *cin = 0; /* keep compiler happy */
- long *cinstat;
+ long *cinstat = 0 /* same here */;
struct bios_tty *t = 0;
char *p;
unsigned short head, bsize, wrap;
@@ -2566,7 +2566,7 @@
* up
*/
if (mousersel) {
- wakeselect(mousersel);
+ wakeselect((PROC *)mousersel);
}
}
diff -u Original/dosfile.c Patched/dosfile.c
--- Original/dosfile.c Sun Jun 11 13:39:50 1995
+++ Patched/dosfile.c Fri Jun 16 09:29:38 1995
@@ -293,13 +293,13 @@
tty->use_cnt <= 1) {
short s = tty->state & (TS_BLIND|TS_HOLD|TS_HPCL);
short u = tty->use_cnt, a = tty->aux_cnt;
- void **r = tty->rsel, **w = tty->wsel;
+ void **r = (void **)tty->rsel, **w = (void **)tty->wsel;
*tty = default_tty;
if (!creating)
tty->state = s;
if ((tty->use_cnt = u) > 1 || !creating) {
tty->aux_cnt = a;
- tty->rsel = r, tty->wsel = w;
+ tty->rsel = (long)r, tty->wsel = (long)w;
}
if (!(f->flags & O_HEAD)) {
tty_ioctl(f, TIOCSTART, 0);
diff -u Original/main.c Patched/main.c
--- Original/main.c Sun Jun 11 13:39:54 1995
+++ Patched/main.c Mon Jun 12 13:49:44 1995
@@ -205,7 +205,8 @@
kmalloc, kfree, umalloc, ufree,
strnicmp, stricmp, strlwr, strupr, ksprintf,
ms_time, unixtim, dostim,
- nap, sleep, wake, (void ARGS_ON_STACK (*)P_((void *))) wakeselect,
+ nap, sleep, wake, /* (void ARGS_ON_STACK (*)P_((void *))) wakeselect, */
+ (void ARGS_ON_STACK (*)P_((long param))) wakeselect,
denyshare, denylock, addtimeout, canceltimeout,
addroottimeout, cancelroottimeout,
ikill, iwake
@@ -532,7 +533,7 @@
do_sync()
{
s_ync();
- addroottimeout(1000l*sync_time, do_sync, 0);
+ addroottimeout(1000l*sync_time, (to_func *)do_sync, 0);
}
#endif
@@ -941,7 +942,7 @@
#ifdef SYSUPDATE_DAEMON
start_sysupdate();
#else
- addroottimeout(1000l*sync_time, do_sync, 0);
+ addroottimeout(1000l*sync_time, (to_func *)do_sync, 0);
#endif
}
diff -u Original/pipefs.c Patched/pipefs.c
--- Original/pipefs.c Sun Jun 11 13:39:58 1995
+++ Patched/pipefs.c Mon Jun 12 13:55:44 1995
@@ -682,7 +682,7 @@
plen >= this->tty->vmin*4) {
/* is someone select()ing the other end of the pipe for reading? */
if (p->rsel) {
- wakeselect(p->rsel);
+ wakeselect((PROC *)p->rsel);
}
wake(IO_Q, (long)p); /* readers may continue */
}
@@ -767,7 +767,7 @@
p->start = 0;
/* is someone select()ing the other end of the pipe for writing? */
if (p->wsel) {
- wakeselect(p->wsel);
+ wakeselect((PROC *)p->wsel);
}
wake(IO_Q, (long)p); /* writers may continue */
}
@@ -1028,7 +1028,7 @@
#else
NULL != (p = this->outp) && p->rsel && p->len > 0)
#endif
- wakeselect (p->rsel);
+ wakeselect ((PROC *)p->rsel);
break;
case TIOCFLUSH:
{
@@ -1051,7 +1051,7 @@
!(this->tty->state & TS_HOLD)) {
wake(IO_Q, (long)this->outp);
if (this->outp->wsel)
- wakeselect (this->outp->wsel);
+ wakeselect ((PROC *)this->outp->wsel);
}
}
break;
@@ -1162,16 +1162,16 @@
/* wake any processes waiting on this pipe */
wake(IO_Q, (long)this->inp);
if (this->inp->rsel)
- wakeselect(this->inp->rsel);
+ wakeselect((PROC *)this->inp->rsel);
if (this->inp->wsel)
- wakeselect(this->inp->wsel);
+ wakeselect((PROC *)this->inp->wsel);
if (this->outp) {
wake(IO_Q, (long)this->outp);
if (this->outp->wsel)
- wakeselect(this->outp->wsel);
+ wakeselect((PROC *)this->outp->wsel);
if (this->outp->rsel)
- wakeselect(this->outp->rsel);
+ wakeselect((PROC *)this->outp->rsel);
}
/* remove the file pointer from the list of open file pointers
diff -u Original/tty.c Patched/tty.c
--- Original/tty.c Sun Jun 11 13:40:03 1995
+++ Patched/tty.c Mon Jun 12 13:51:13 1995
@@ -813,7 +813,7 @@
(void)(*f->dev->ioctl)(f, FIONWRITE, &r);
if (r && !(tty->state & TS_BLIND))
- wakeselect (tty->wsel);
+ wakeselect ((PROC *)tty->wsel);
}
return 0;
case TIOCSTOP:
------------------------------- schnapp --------------------------