From 9f8afa72d13f221932e25bb15f01799e171d93a1 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 19 Apr 2013 15:36:24 +0000 Subject: [PATCH] -Wpointer-sign: cp-valprint.c. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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-19 Pedro Alves * cp-valprint.c (cp_print_class_member): Change type of 'fieldno' local to int. --- gdb/ChangeLog | 5 +++++ gdb/cp-valprint.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c265d247f4..f2e672c6fc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-04-19 Pedro Alves + + * cp-valprint.c (cp_print_class_member): Change type of 'fieldno' + local to int. + 2013-04-19 Pedro Alves * ada-lang.c (print_it_exception): Add cast to gdb_byte *. diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c index 9a8b4d3008..0871848ec7 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),