This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 24/26] -Wpointer-sign: cp-valprint.c.
- From: Pedro Alves <palves at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 12 Apr 2013 00:01:52 +0100
- Subject: [PATCH 24/26] -Wpointer-sign: cp-valprint.c.
- References: <20130411225847 dot 16791 dot 29283 dot stgit at brno dot lan>
Fix:
../../src/gdb/cp-valprint.c: In function âcp_print_class_memberâ:
../../src/gdb/cp-valprint.c:793:3: error: pointer targets in passing argument 2 of âcp_find_class_memberâ differ in signedness [-Werror=pointer-sign]
../../src/gdb/cp-valprint.c:721:1: note: expected âint *â but argument is of type âunsigned int *â
'fieldno' is used throughout as 'int', so just follow the trend.
gdb/
2013-04-11 Pedro Alves <palves@redhat.com>
* cp-valprint.c (cp_print_class_member): Change type of 'fieldno'
local to int.
---
gdb/cp-valprint.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c
index 9a8b4d3..0871848 100644
--- a/gdb/cp-valprint.c
+++ b/gdb/cp-valprint.c
@@ -768,7 +768,7 @@ cp_print_class_member (const gdb_byte *valaddr, struct type *type,
print it. */
struct type *domain = TYPE_DOMAIN_TYPE (type);
LONGEST val;
- unsigned int fieldno;
+ int fieldno;
val = extract_signed_integer (valaddr,
TYPE_LENGTH (type),