This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 26/26] -Wpointer-sign: record.c.
- From: Pedro Alves <palves at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 12 Apr 2013 00:02:07 +0100
- Subject: [PATCH 26/26] -Wpointer-sign: record.c.
- References: <20130411225847 dot 16791 dot 29283 dot stgit at brno dot lan>
../../src/gdb/record.c: In function âset_record_insn_history_sizeâ:
../../src/gdb/record.c:670:5: error: pointer targets in passing argument 2 of âvalidate_history_sizeâ differ in signedness [-Werror=pointer-sign]
../../src/gdb/record.c:646:1: note: expected âint *â but argument is of type âunsigned int *â
../../src/gdb/record.c: In function âset_record_call_history_sizeâ:
../../src/gdb/record.c:682:5: error: pointer targets in passing argument 2 of âvalidate_history_sizeâ differ in signedness [-Werror=pointer-sign]
../../src/gdb/record.c:646:1: note: expected âint *â but argument is of type âunsigned int *â
Here's the obvious fix.
gdb/
2013-04-11 Pedro Alves <palves@redhat.com>
* record.c (validate_history_size): Make parameter 'setting'
unsigned.
---
gdb/record.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/record.c b/gdb/record.c
index 0a7f0a1..76d9fd2 100644
--- a/gdb/record.c
+++ b/gdb/record.c
@@ -643,7 +643,7 @@ cmd_record_call_history (char *arg, int from_tty)
is the real setting the command allows changing. */
static void
-validate_history_size (unsigned int *command_var, int *setting)
+validate_history_size (unsigned int *command_var, unsigned int *setting)
{
if (*command_var != UINT_MAX && *command_var > INT_MAX)
{