This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[ob] More warnings; Call for assistance
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Tue, 17 Jan 2006 10:17:31 -0500
- Subject: [ob] More warnings; Call for assistance
Here's the last two that are particularly straightforward. Committed as
obvious. But there's more:
/space/fsf/commit/src/gdb/printcmd.c:1964: warning: format not a string literal, argument types not checked
/space/fsf/commit/src/gdb/printcmd.c:1970: warning: format not a string literal, argument types not checked
/space/fsf/commit/src/gdb/printcmd.c:1977: warning: format not a string literal, argument types not checked
/space/fsf/commit/src/gdb/printcmd.c:1987: warning: format not a string literal, argument types not checked
/space/fsf/commit/src/gdb/expprint.c:180: warning: pointer targets in passing argument 2 of 'current_language->la_printstr' differ in signedness
/space/fsf/commit/src/gdb/expprint.c:194: warning: pointer targets in passing argument 2 of 'current_language->la_printstr' differ in signedness
/space/fsf/commit/src/gdb/expprint.c:273: warning: pointer targets in passing argument 2 of 'current_language->la_printstr' differ in signedness
/space/fsf/commit/src/gdb/kod.c:124: warning: pointer targets in passing argument 4 of 'target_read_partial' differ in signedness
/space/fsf/commit/src/gdb/coff-pe-read.c:299: warning: pointer targets in assignment differ in signedness
/space/fsf/commit/src/gdb/coff-pe-read.c:338: warning: pointer targets in passing argument 1 of 'add_pe_exported_sym' differ in signedness
/space/fsf/commit/src/gdb/dwarf2read.c:7059: warning: pointer targets in passing argument 1 of 'store_unsigned_integer' differ in signedness
/space/fsf/commit/src/gdb/dwarf2read.c:9235: warning: pointer targets in assignment differ in signedness
/space/fsf/commit/src/gdb/dwarf2read.c:9260: warning: pointer targets in assignment differ in signedness
/space/fsf/commit/src/gdb/corefile.c:332: warning: pointer targets in passing argument 2 of 'read_memory' differ in signedness
/space/fsf/commit/src/gdb/ada-lang.c:357: warning: pointer targets in passing argument 2 of 'target_read_memory' differ in signedness
/space/fsf/commit/src/gdb/ada-lang.c:1217: warning: pointer targets in passing argument 1 of 'modify_field' differ in signedness
/space/fsf/commit/src/gdb/ada-lang.c:2173: warning: pointer targets in passing argument 2 of 'read_memory' differ in signedness
/space/fsf/commit/src/gdb/ada-lang.c:2178: warning: pointer targets in passing argument 1 of 'move_bits' differ in signedness
/space/fsf/commit/src/gdb/ada-lang.c:2181: warning: pointer targets in passing argument 1 of 'move_bits' differ in signedness
/space/fsf/commit/src/gdb/ada-lang.c:2182: warning: pointer targets in passing argument 2 of 'write_memory' differ in signedness
/space/fsf/commit/src/gdb/ada-lang.c:3749: warning: pointer targets in passing argument 1 of 'modify_general_field' differ in signedness
/space/fsf/commit/src/gdb/ada-lang.c:3753: warning: pointer targets in passing argument 1 of 'modify_general_field' differ in signedness
/space/fsf/commit/src/gdb/ada-lang.c:3761: warning: pointer targets in passing argument 1 of 'modify_general_field' differ in signedness
/space/fsf/commit/src/gdb/ada-lang.c:3766: warning: pointer targets in passing argument 1 of 'modify_general_field' differ in signedness
/space/fsf/commit/src/gdb/dwarf2-frame.c:1735: warning: pointer targets in assignment differ in signedness
/space/fsf/commit/src/gdb/dwarf2-frame.c:1763: warning: pointer targets in assignment differ in signedness
The printcmd.c warnings we've been looking at for ages; they should be
fixed, but it doesn't have to be this week. The other warnings are mostly
things that will require large overhauls to get right, for instance:
LA_PRINT_STRING takes a const gdb_byte * argument for the string. But this
is a NUL-terminated string in the debugger's memory; I think stepping back
to char * is the best fix here. That's the expprint.c warnings.
Two of the dwarf2read.c warnings are caused by the use of char * buffers for
debugger data. This is binary data, using gdb_byte * seems reasonable, but
it's all over the file.
The other in that file is caused by SYMBOL_VALUE_BYTES which needs
gdb_bytizing.
I have no idea what the state of kod.c is nowadays. Does it still work?
Does anyone still use it? Is it still a good idea? The warning comes from
a multi-file interface defined to use char*.
And so forth. I don't think I'm going to fix any of the rest.
--
Daniel Jacobowitz
CodeSourcery
2006-01-17 Daniel Jacobowitz <dan@codesourcery.com>
* complaints.c (stop_whining): Make signed.
* linux-thread-db.c (thread_db_store_registers): Use gdb_byte.
Index: complaints.c
===================================================================
RCS file: /cvs/src/src/gdb/complaints.c,v
retrieving revision 1.23
diff -u -p -r1.23 complaints.c
--- complaints.c 17 Dec 2005 22:33:59 -0000 1.23
+++ complaints.c 17 Jan 2006 14:56:57 -0000
@@ -1,7 +1,7 @@
/* Support for complaint handling during symbol reading in GDB.
Copyright (C) 1990, 1991, 1992, 1993, 1995, 1998, 1999, 2000, 2002,
- 2004, 2005 Free Software Foundation, Inc.
+ 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GDB.
@@ -161,7 +161,7 @@ find_complaint (struct complaints *compl
before we stop whining about it? Default is no whining at all,
since so many systems have ill-constructed symbol files. */
-static unsigned int stop_whining = 0;
+static int stop_whining = 0;
/* Print a complaint, and link the complaint block into a chain for
later handling. */
Index: linux-thread-db.c
===================================================================
RCS file: /cvs/src/src/gdb/linux-thread-db.c,v
retrieving revision 1.12
diff -u -p -r1.12 linux-thread-db.c
--- linux-thread-db.c 17 Dec 2005 22:34:01 -0000 1.12
+++ linux-thread-db.c 17 Jan 2006 14:56:57 -0000
@@ -1,6 +1,6 @@
/* libthread_db assisted debugging support, generic parts.
- Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005
+ Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of GDB.
@@ -1048,7 +1048,7 @@ thread_db_store_registers (int regno)
if (regno != -1)
{
- char raw[MAX_REGISTER_SIZE];
+ gdb_byte raw[MAX_REGISTER_SIZE];
deprecated_read_register_gen (regno, raw);
thread_db_fetch_registers (-1);