public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: "Ben Elliston" <bje@au1.ibm.com>
To: insight@sources.redhat.com
Subject: some warning patches
Date: Mon, 13 Dec 2004 05:02:00 -0000	[thread overview]
Message-ID: <20041213050309.GA10532@namadgi> (raw)

[-- Attachment #1: Type: text/plain, Size: 2507 bytes --]

This patch should be sufficiently obvious.  Perhaps gdbtk_two_elem_cmd
should take a const char * as its second argument, but I've just
followed the tradition set throughout gdbtk-hooks.c. ;-)

Ben


2004-12-13  Ben Elliston  <bje@au.ibm.com>

	Remove some warnings:
	* generic/gdbtk-hooks.c (gdbtk_pre_add_symbol): Cast `name'.
	* generic/gdbtk-cmds.c (gdbtk_dis_asm_read_memory): Remove.

Index: generic/gdbtk-hooks.c
===================================================================
RCS file: /home/bje/src-cvs/src/gdb/gdbtk/generic/gdbtk-hooks.c,v
retrieving revision 1.38
diff -u -p -r1.38 gdbtk-hooks.c
--- generic/gdbtk-hooks.c	26 Jun 2004 20:30:51 -0000	1.38
+++ generic/gdbtk-hooks.c	13 Dec 2004 05:00:16 -0000
@@ -597,7 +597,7 @@ gdbtk_load_hash (const char *section, un
 static void
 gdbtk_pre_add_symbol (const char *name)
 {
-  gdbtk_two_elem_cmd ("gdbtk_tcl_pre_add_symbol", name);
+  gdbtk_two_elem_cmd ("gdbtk_tcl_pre_add_symbol", (char *) name);
 }
 
 /* This hook is called whenever we finish loading a symbol file. */

Index: generic/gdbtk-cmds.c
===================================================================
RCS file: /home/bje/src-cvs/src/gdb/gdbtk/generic/gdbtk-cmds.c,v
retrieving revision 1.84
diff -u -p -r1.84 gdbtk-cmds.c
--- generic/gdbtk-cmds.c	19 Nov 2004 00:19:56 -0000	1.84
+++ generic/gdbtk-cmds.c	13 Dec 2004 05:00:16 -0000
@@ -180,8 +180,6 @@ static int gdb_stop (ClientData, Tcl_Int
 static int gdb_target_has_execution_command (ClientData,
 					     Tcl_Interp *, int,
 					     Tcl_Obj * CONST[]);
-static int gdbtk_dis_asm_read_memory (bfd_vma, bfd_byte *, unsigned int,
-				      disassemble_info *);
 static void gdbtk_load_source (ClientData clientData,
 			       struct symtab *symtab,
 			       int start_line, int end_line);
@@ -2075,27 +2073,6 @@ gdb_disassemble_driver (CORE_ADDR low, C
     }
 
   return TCL_OK;
-}
-
-/* This is the memory_read_func for gdb_disassemble_driver when we are
-   disassembling from the exec file. */
-
-static int
-gdbtk_dis_asm_read_memory (bfd_vma memaddr, bfd_byte *myaddr,
-			   unsigned int len, disassemble_info *info)
-{
-  extern struct target_ops exec_ops;
-  int res;
-
-  errno = 0;
-  res = xfer_memory (memaddr, myaddr, len, 0, 0, &exec_ops);
-
-  if (res == len)
-    return 0;
-  else if (errno == 0)
-    return EIO;
-  else
-    return errno;
 }
 
 /* This will be passed to qsort to sort the results of the disassembly */

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2004-12-13  5:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-13  5:02 Ben Elliston [this message]
2004-12-13 18:57 ` Keith Seitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041213050309.GA10532@namadgi \
    --to=bje@au1.ibm.com \
    --cc=insight@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).