From: Andrew Cagney Date: Tue, 29 Feb 2000 07:45:13 +0000 (+0000) Subject: From Eli. Warning fixes. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9d271fd8b3c0f2aa013badabd02ea25fc113e082;p=binutils-gdb.git From Eli. Warning fixes. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0d85d0232ca..28484c95344 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,16 @@ +Tue Feb 29 18:40:08 2000 Andrew Cagney + + From 2000-02-23 Eli Zaretskii : + * utils.c [__GO32__]: Include pc.h, for prototypes of ScreenCols + and ScreenRows. + * ser-go32.c: Include string.h, for prototype of strncasecmp. + (dpmi_regs, dpmi_sregs): Remove unused variables. + (dos_flush_input): Return a value, to prevent compiler warning. + * expprint.c (dump_prefix_expression): Use %ld in format and cast + sizeof(union exp_element) to long, to prevent GCC from complaining + about format/argument mismatch. + (dump_postfix_expression): Likewise. + Tue Feb 29 18:09:46 2000 Andrew Cagney * arm-tdep.c: Include . diff --git a/gdb/expprint.c b/gdb/expprint.c index 8c0fe4f736f..4b5245cd64f 100644 --- a/gdb/expprint.c +++ b/gdb/expprint.c @@ -710,9 +710,9 @@ dump_prefix_expression (exp, stream, note) print_expression (exp, stream); else fprintf_filtered (stream, "Type printing not yet supported...."); - fprintf_filtered (stream, "'\n\tLanguage %s, %d elements, %d bytes each.\n", + fprintf_filtered (stream, "'\n\tLanguage %s, %d elements, %ld bytes each.\n", exp->language_defn->la_name, exp->nelts, - sizeof (union exp_element)); + (long) sizeof (union exp_element)); fprintf_filtered (stream, "\t%5s %20s %16s %s\n", "Index", "Opcode", "Hex Value", "String Value"); for (elt = 0; elt < exp->nelts; elt++) @@ -986,9 +986,9 @@ dump_postfix_expression (exp, stream, note) print_expression (exp, stream); else fputs_filtered ("Type printing not yet supported....", stream); - fprintf_filtered (stream, "'\n\tLanguage %s, %d elements, %d bytes each.\n", + fprintf_filtered (stream, "'\n\tLanguage %s, %d elements, %ld bytes each.\n", exp->language_defn->la_name, exp->nelts, - sizeof (union exp_element)); + (long) sizeof (union exp_element)); fputs_filtered ("\n", stream); for (elt = 0; elt < exp->nelts;) diff --git a/gdb/ser-go32.c b/gdb/ser-go32.c index 94a7861c35c..0474000e61a 100644 --- a/gdb/ser-go32.c +++ b/gdb/ser-go32.c @@ -127,15 +127,12 @@ #define MSR_DDSR 0x02 #define MSR_DCTS 0x01 +#include #include #include #include typedef unsigned long u_long; -/* DPMI Communication */ -static union REGS dpmi_regs; -static struct SREGS dpmi_sregs; - /* 16550 rx fifo trigger point */ #define FIFO_TRIGGER FIFO_TRIGGER_4 @@ -693,6 +690,7 @@ dos_flush_input (scb) if (port->fifo) outb (port, com_fifo, FIFO_ENABLE | FIFO_RCV_RST | FIFO_TRIGGER); enable (); + return 0; } static void diff --git a/gdb/utils.c b/gdb/utils.c index 2c8d4028493..501c8618db3 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -31,6 +31,10 @@ #include #endif +#ifdef __GO32__ +#include +#endif + /* SunOS's curses.h has a '#define reg register' in it. Thank you Sun. */ #ifdef reg #undef reg