summaryrefslogtreecommitdiffstats
path: root/generic/tclInterp.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2009-12-16 23:25:59 (GMT)
committernijtmans <nijtmans>2009-12-16 23:25:59 (GMT)
commitc09d5284e91311929d7e92c73492076e8a05cd36 (patch)
treeb7038bbc46d46d90860a433594776df4f31d744e /generic/tclInterp.c
parentcf4896697457a54ad804eebeb31b63e27e41cb6c (diff)
downloadtcl-c09d5284e91311929d7e92c73492076e8a05cd36.zip
tcl-c09d5284e91311929d7e92c73492076e8a05cd36.tar.gz
tcl-c09d5284e91311929d7e92c73492076e8a05cd36.tar.bz2
Fix gcc warning: ignoring return value of ‘write’,
declared with attribute warn_unused_result CONSTify functions TclpGetUserHome and TclSetPreInitScript (TIP #27)
Diffstat (limited to 'generic/tclInterp.c')
-rw-r--r--generic/tclInterp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclInterp.c b/generic/tclInterp.c
index edf31ff..89b635d 100644
--- a/generic/tclInterp.c
+++ b/generic/tclInterp.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclInterp.c,v 1.107 2009/12/05 21:30:05 msofer Exp $
+ * RCS: @(#) $Id: tclInterp.c,v 1.108 2009/12/16 23:26:01 nijtmans Exp $
*/
#include "tclInt.h"
@@ -21,7 +21,7 @@
* above. This variable can be modified by the function below.
*/
-static char *tclPreInitScript = NULL;
+static const char *tclPreInitScript = NULL;
/* Forward declaration */
struct Target;
@@ -265,11 +265,11 @@ static void TimeLimitCallback(ClientData clientData);
*----------------------------------------------------------------------
*/
-char *
+const char *
TclSetPreInitScript(
- char *string) /* Pointer to a script. */
+ const char *string) /* Pointer to a script. */
{
- char *prevString = tclPreInitScript;
+ const char *prevString = tclPreInitScript;
tclPreInitScript = string;
return(prevString);
}