This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] Fix a few GCC 4.x warnings
- From: Mark Kettenis <kettenis at gnu dot org>
- To: gdb-patches at sourceware dot org
- Date: Tue, 12 Jul 2005 14:13:55 +0200
- Subject: [commit] Fix a few GCC 4.x warnings
Proper gdb_bytization.
Committed as obvious,
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* objc-lang.c (print_object_command): Use gdb_byte for c.
* arch-utils.c (legacy_extract_return_value): Use 'gdb_byte *' for
registers.
Index: objc-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/objc-lang.c,v
retrieving revision 1.48
diff -u -p -r1.48 objc-lang.c
--- objc-lang.c 9 May 2005 21:20:34 -0000 1.48
+++ objc-lang.c 12 Jul 2005 12:09:39 -0000
@@ -1528,7 +1528,7 @@ print_object_command (char *args, int fr
struct value *object, *function, *description;
CORE_ADDR string_addr, object_addr;
int i = 0;
- char c = -1;
+ gdb_byte c = 0;
if (!args || !*args)
error (
@@ -1560,7 +1560,7 @@ print_object_command (char *args, int fr
error (_("object returns null description"));
read_memory (string_addr + i++, &c, 1);
- if (c != '\0')
+ if (c != 0)
do
{ /* Read and print characters up to EOS. */
QUIT;
Index: arch-utils.c
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.c,v
retrieving revision 1.131
diff -u -p -r1.131 arch-utils.c
--- arch-utils.c 14 May 2005 06:07:41 -0000 1.131
+++ arch-utils.c 12 Jul 2005 12:09:40 -0000
@@ -1,7 +1,7 @@
/* Dynamic architecture support for GDB, the GNU debugger.
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
- Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ Free Software Foundation, Inc.
This file is part of GDB.
@@ -43,7 +43,7 @@ void
legacy_extract_return_value (struct type *type, struct regcache *regcache,
gdb_byte *valbuf)
{
- char *registers = deprecated_grub_regcache_for_registers (regcache);
+ gdb_byte *registers = deprecated_grub_regcache_for_registers (regcache);
gdb_byte *buf = valbuf;
DEPRECATED_EXTRACT_RETURN_VALUE (type, registers, buf); /* OK */
}