public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: "Insight (GDB GUI)" <insight@sourceware.cygnus.com>
Subject: host_name and target_name
Date: Fri, 03 Sep 1999 03:25:00 -0000	[thread overview]
Message-ID: <37CFA1EC.E424E2BD@cygnus.com> (raw)

Hello,

I recently changed the type of ``host_name'' and ``target_name'' to
(const char *) since they are not modified.  Unfortunatly, Tcl_SetVar2()
expects a non-const value parameter even though it does treat it as
const/read-only.

The patch below casts those parameters.  Perhaphs this should be
converted into a bug-report for the TCL group.

	Andrew
Fri Sep  3 20:16:54 1999  Andrew Cagney  <cagney@b1.cygnus.com>

	* gdbtk.c (gdbtk_init): Cast ``host_name'' and ``target_name'' to
 	void.  While Tcl_SetVar2 treats the value argument as read-only
	its prototype does not specify const for the parameter.

Index: gdbtk.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/gdbtk.c,v
retrieving revision 2.141
diff -p -r2.141 gdbtk.c
*** gdbtk.c	1999/09/03 10:15:31	2.141
--- gdbtk.c	1999/09/03 10:20:37
*************** gdbtk_init (argv0)
*** 403,410 ****
       for start up options and the like */
    sprintf (s, "%d", inhibit_gdbinit);
    Tcl_SetVar2 (gdbtk_interp, "GDBStartup", "inhibit_prefs", s, TCL_GLOBAL_ONLY);
!   Tcl_SetVar2 (gdbtk_interp, "GDBStartup", "host_name", host_name, TCL_GLOBAL_ONLY);
!   Tcl_SetVar2 (gdbtk_interp, "GDBStartup", "target_name", target_name, TCL_GLOBAL_ONLY);
  
    make_final_cleanup (gdbtk_cleanup, NULL);
  
--- 403,413 ----
       for start up options and the like */
    sprintf (s, "%d", inhibit_gdbinit);
    Tcl_SetVar2 (gdbtk_interp, "GDBStartup", "inhibit_prefs", s, TCL_GLOBAL_ONLY);
!   /* Note: Tcl_SetVar2() treats the value as read-only (making a
!      copy).  Unfortunatly it does not mark the parameter as
!      ``const''. */
!   Tcl_SetVar2 (gdbtk_interp, "GDBStartup", "host_name", (char*) host_name, TCL_GLOBAL_ONLY);
!   Tcl_SetVar2 (gdbtk_interp, "GDBStartup", "target_name", (char*) target_name, TCL_GLOBAL_ONLY);
  
    make_final_cleanup (gdbtk_cleanup, NULL);
  

                 reply	other threads:[~1999-09-03  3:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=37CFA1EC.E424E2BD@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=insight@sourceware.cygnus.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).