From baa6f10b321f9eabc092fcdb26d2005638a8a16c Mon Sep 17 00:00:00 2001 From: Jason Thorpe Date: Tue, 23 Apr 2002 03:00:57 +0000 Subject: [PATCH] * findvar.c (extract_signed_integer): Cast printf argument to suppress format warning. (extract_unsigned_integer): Likewise. * infcmd.c (registers_info): Likewise. * top.c (get_prompt_1): Likewise. * valops.c (value_assign): Likewise. * valprint.c (print_decimal): Likewise. --- gdb/ChangeLog | 10 ++++++++++ gdb/findvar.c | 4 ++-- gdb/infcmd.c | 2 +- gdb/top.c | 4 ++-- gdb/valops.c | 4 ++-- gdb/valprint.c | 2 +- 6 files changed, 18 insertions(+), 8 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f2c6986f858..3aea36249e6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +2002-04-22 Jason Thorpe + + * findvar.c (extract_signed_integer): Cast printf argument + to suppress format warning. + (extract_unsigned_integer): Likewise. + * infcmd.c (registers_info): Likewise. + * top.c (get_prompt_1): Likewise. + * valops.c (value_assign): Likewise. + * valprint.c (print_decimal): Likewise. + 2002-04-22 H.J. Lu (hjl@gnu.org) * c-exp.y (typebase): Support diff --git a/gdb/findvar.c b/gdb/findvar.c index 06ad4987a1b..0f116ed9adf 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -57,7 +57,7 @@ extract_signed_integer (void *addr, int len) if (len > (int) sizeof (LONGEST)) error ("\ That operation is not available on integers of more than %d bytes.", - sizeof (LONGEST)); + (int) sizeof (LONGEST)); /* Start at the most significant end of the integer, and work towards the least significant. */ @@ -91,7 +91,7 @@ extract_unsigned_integer (void *addr, int len) if (len > (int) sizeof (ULONGEST)) error ("\ That operation is not available on integers of more than %d bytes.", - sizeof (ULONGEST)); + (int) sizeof (ULONGEST)); /* Start at the most significant end of the integer, and work towards the least significant. */ diff --git a/gdb/infcmd.c b/gdb/infcmd.c index a7496d1f88c..400ac552d2d 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -1681,7 +1681,7 @@ registers_info (char *addr_exp, int fpregs) if (*addr_exp >= '0' && *addr_exp <= '9') regnum = atoi (addr_exp); /* Take a number */ if (regnum >= numregs) /* Bad name, or bad number */ - error ("%.*s: invalid register", end - addr_exp, addr_exp); + error ("%.*s: invalid register", (int) (end - addr_exp), addr_exp); found: DO_REGISTERS_INFO (regnum, fpregs); diff --git a/gdb/top.c b/gdb/top.c index 200d699344b..4749c381809 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -1435,7 +1435,7 @@ get_prompt_1 (void *data) if (*promptp != gdb_prompt_escape) error ("Syntax error at prompt position %d", - promptp - local_prompt); + (int) (promptp - local_prompt)); else { promptp++; /* skip second escape char */ @@ -1581,7 +1581,7 @@ get_prompt_1 (void *data) break; /* void type -- no output */ default: error ("bad data type at prompt position %d", - promptp - local_prompt); + (int) (promptp - local_prompt)); break; } outp += strlen (outp); diff --git a/gdb/valops.c b/gdb/valops.c index 3db7341df6e..16d3c8cf3a2 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -607,7 +607,7 @@ value_assign (struct value *toval, struct value *fromval) if (changed_len > (int) sizeof (LONGEST)) error ("Can't handle bitfields which don't fit in a %d bit word.", - sizeof (LONGEST) * HOST_CHAR_BIT); + (int) sizeof (LONGEST) * HOST_CHAR_BIT); read_memory (VALUE_ADDRESS (toval) + VALUE_OFFSET (toval), buffer, changed_len); @@ -644,7 +644,7 @@ value_assign (struct value *toval, struct value *fromval) if (len > (int) sizeof (LONGEST)) error ("Can't handle bitfields in registers larger than %d bits.", - sizeof (LONGEST) * HOST_CHAR_BIT); + (int) sizeof (LONGEST) * HOST_CHAR_BIT); if (VALUE_BITPOS (toval) + VALUE_BITSIZE (toval) > len * HOST_CHAR_BIT) diff --git a/gdb/valprint.c b/gdb/valprint.c index be22ce69e94..39cf04c7173 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -335,7 +335,7 @@ print_longest (struct ui_file *stream, int format, int use_local, val_long); break; case 'u': - fprintf_filtered (stream, "%llu", val_long); + fprintf_filtered (stream, "%llu", (long long) val_long); break; case 'x': fprintf_filtered (stream, -- 2.30.2