From: Alan Cox Date: Fri, 28 Nov 2014 22:27:17 +0000 (+0000) Subject: devio: tty queue functions are really unsigned char X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=2c82a04573cd7bd11f7e064757fcd7334126ab18;p=FUZIX.git devio: tty queue functions are really unsigned char gcc cares so quieten it down --- diff --git a/Kernel/devio.c b/Kernel/devio.c index ae58ab8d..bbcc5bc2 100644 --- a/Kernel/devio.c +++ b/Kernel/devio.c @@ -331,7 +331,7 @@ int no_ioctl(uint8_t minor, uint16_t a, char *b) */ /* add something to the tail of the queue. */ -bool insq(struct s_queue * q, char c) +bool insq(struct s_queue * q, unsigned char c) { bool r; @@ -352,7 +352,7 @@ bool insq(struct s_queue * q, char c) /* Remove something from the head of the queue. */ -bool remq(struct s_queue * q, char *cp) +bool remq(struct s_queue * q, unsigned char *cp) { bool r; @@ -386,7 +386,7 @@ void clrq(struct s_queue *q) /* Remove something from the tail; the most recently added char. */ -bool uninsq(struct s_queue *q, char *cp) +bool uninsq(struct s_queue *q, unsigned char *cp) { bool r; irqflags_t irq = di(); diff --git a/Kernel/include/kernel.h b/Kernel/include/kernel.h index cf3e2d69..3b3e3882 100644 --- a/Kernel/include/kernel.h +++ b/Kernel/include/kernel.h @@ -62,8 +62,8 @@ From UZI by Doug Braun and UZI280 by Stefan Nitschke. #define NO_FILE (0xFF) typedef struct s_queue { - char *q_base; /* Pointer to data */ - char *q_head; /* Pointer to addr of next char to read. */ + unsigned char *q_base; /* Pointer to data */ + unsigned char *q_head; /* Pointer to addr of next char to read. */ char *q_tail; /* Pointer to where next char to insert goes. */ int q_size; /* Max size of queue */ int q_count; /* How many characters presently in queue */ @@ -577,10 +577,10 @@ CODE1 int d_open(uint16_t dev, uint8_t flag); CODE1 int d_close(uint16_t dev); CODE1 int d_ioctl(uint16_t dev, uint16_t request, char *data); CODE1 int cdwrite(uint16_t dev, uint8_t flag); -CODE1 bool insq(struct s_queue *q, char c); -CODE1 bool remq(struct s_queue *q, char *cp); +CODE1 bool insq(struct s_queue *q, unsigned char c); +CODE1 bool remq(struct s_queue *q, unsigned char *cp); CODE1 void clrq(struct s_queue *q); -CODE1 bool uninsq(struct s_queue *q, char *cp); +CODE1 bool uninsq(struct s_queue *q, unsigned char *cp); CODE1 int psleep_flags(void *event, unsigned char flags); CODE1 int nxio_open(uint8_t minor, uint16_t flag); CODE1 int no_open(uint8_t minor, uint16_t flag);