From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31048 invoked by alias); 17 Jan 2006 15:17:37 -0000 Received: (qmail 31028 invoked by uid 22791); 17 Jan 2006 15:17:35 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Tue, 17 Jan 2006 15:17:33 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1EysaR-0000ma-3B for gdb-patches@sourceware.org; Tue, 17 Jan 2006 10:17:31 -0500 Date: Tue, 17 Jan 2006 15:17:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Subject: [ob] More warnings; Call for assistance Message-ID: <20060117151730.GA2420@nevyn.them.org> Mail-Followup-To: gdb-patches@sourceware.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00214.txt.bz2 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 * 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);