diff options
author | Matt Fleming <matt.fleming@intel.com> | 2012-04-03 10:48:52 +0100 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2012-04-17 10:58:34 +0100 |
commit | c23ac08d9e3c1582906ca4f412effdb56fe19b37 (patch) | |
tree | bdddc3eb4f46d74e884a7699fabd2cf3908418cc | |
parent | 8d2c8de3a3bcc969e45716649583bf5f62936379 (diff) | |
download | syslinux-c23ac08d9e3c1582906ca4f412effdb56fe19b37.tar.gz syslinux-c23ac08d9e3c1582906ca4f412effdb56fe19b37.tar.xz syslinux-c23ac08d9e3c1582906ca4f412effdb56fe19b37.zip |
ldlinux: Use signed char consistently
In get_key() we use unsigned chars but seem to use signed chars in
other functions. There's no real reason to use unsigned chars so let's
be consistent. This also eliminates the following warnings,
get_key.c: In function ‘get_key’:
get_key.c:187:2: warning: pointer targets in passing argument 1 of ‘get_key_decode’ differ in signedness
get_key.c:129:5: note: expected ‘char *’ but argument is of type ‘unsigned char *’
serirq.c:29:29: warning: pointer targets in initialization differ in signedness
serirq.c:30:29: warning: pointer targets in initialization differ in signedness
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r-- | com32/elflink/ldlinux/get_key.c | 4 | ||||
-rw-r--r-- | core/include/bios.h | 4 | ||||
-rw-r--r-- | core/serirq.c | 10 |
3 files changed, 9 insertions, 9 deletions
diff --git a/com32/elflink/ldlinux/get_key.c b/com32/elflink/ldlinux/get_key.c index 42ff5c12..f6e16e99 100644 --- a/com32/elflink/ldlinux/get_key.c +++ b/com32/elflink/ldlinux/get_key.c @@ -148,10 +148,10 @@ int get_key_decode(char *buffer, int nc, int *code) int get_key(FILE * f, clock_t timeout) { - unsigned char buffer[KEY_MAXLEN]; + char buffer[KEY_MAXLEN]; int nc, i, rv; int another; - unsigned char ch; + char ch; clock_t start; int code; diff --git a/core/include/bios.h b/core/include/bios.h index 3c49cf22..1248e482 100644 --- a/core/include/bios.h +++ b/core/include/bios.h @@ -96,8 +96,8 @@ extern void vgaclearmode(void); extern void vgadisplayfile(FILE *fd); /* serirq.c */ -extern unsigned char *SerialHead; -extern unsigned char *SerialTail; +extern char *SerialHead; +extern char *SerialTail; extern void bios_init(void); extern void bios_cleanup_hardware(void); diff --git a/core/serirq.c b/core/serirq.c index 767099e1..e0675c9a 100644 --- a/core/serirq.c +++ b/core/serirq.c @@ -26,8 +26,8 @@ static char serial_buf[serial_buf_size]; static unsigned short SerialIRQPort; /* Serial port w IRQ service */ -unsigned char *SerialHead = serial_buf; /* Head of serial port rx buffer */ -unsigned char *SerialTail = serial_buf; /* Tail of serial port rx buffer */ +char *SerialHead = serial_buf; /* Head of serial port rx buffer */ +char *SerialTail = serial_buf; /* Tail of serial port rx buffer */ static unsigned char IRQMask[2]; /* PIC IRQ mask status */ @@ -39,11 +39,11 @@ void sirq_cleanup(void); static void irq_common(unsigned short old_irq) { - unsigned char *dst; + char *dst; irqhandler_t next; char val; - dst = (unsigned char *)SerialHead; + dst = SerialHead; next = (irqhandler_t)oldirq[old_irq]; /* LSR */ @@ -57,7 +57,7 @@ static void irq_common(unsigned short old_irq) val = inb(SerialPort + 5); if ((val & FlowIgnore) == FlowIgnore) { /* Wrap around if necessary */ - dst = (unsigned char *)((unsigned long)dst & (serial_buf_size - 1)); + dst = (char *)((unsigned long)dst & (serial_buf_size - 1)); /* Would this cause overflow? */ if (dst != SerialTail) |